Skip to content

Commit 13bb4cd

Browse files
committed
Change LBFGS to ConjugateGradient optimization routine
1 parent 40ce627 commit 13bb4cd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/fit/solver.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ function update!(ε::SpatialAutoregression, e::AbstractMatrix, Λ::AbstractMatri
264264

265265
return -logdet(G) + 0.5 * dot(Ω, Eee) / size(e, 2)
266266
end
267-
opt = optimize(objective, logit.((spatial(ε) .+ offset) ./ scale), LBFGS(),
267+
opt = optimize(objective, logit.((spatial(ε) .+ offset) ./ scale), ConjugateGradient(),
268268
Optim.Options(g_tol = 1e-4))
269269
spatial(ε) .= scale .* logistic.(Optim.minimizer(opt)) .- offset
270270

@@ -322,7 +322,7 @@ function update!(ε::SpatialMovingAverage, e::AbstractMatrix, Λ::AbstractMatrix
322322

323323
return logdet(G) + 0.5 * tr\ Eee) / size(e, 2)
324324
end
325-
opt = optimize(objective, logit.((spatial(ε) .+ offset) ./ scale), LBFGS(),
325+
opt = optimize(objective, logit.((spatial(ε) .+ offset) ./ scale), ConjugateGradient(),
326326
Optim.Options(g_tol = 1e-4))
327327
spatial(ε) .= scale .* logistic.(Optim.minimizer(opt)) .- offset
328328

0 commit comments

Comments
 (0)