Skip to content

Commit

Permalink
Update solvers used
Browse files Browse the repository at this point in the history
  • Loading branch information
qntwrsm committed May 13, 2024
1 parent 3f51d81 commit cbe8b90
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/fit/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function update_loadings!(

return (0.5 * dot(ΩΛ, Λ * Eff) - dot(ΩΛ, Eyf)) / length(V)
end
opt = optimize(objective, [log(decay(F))], LBFGS(), Optim.Options(g_tol=1e-4))
opt = optimize(objective, [log(decay(F))], BFGS(), Optim.Options(g_tol=1e-4))
F.λ = exp(Optim.minimizer(opt)[1])

return nothing
Expand Down Expand Up @@ -268,7 +268,7 @@ function update!(ε::SpatialAutoregression, Λ::AbstractMatrix, V::AbstractVecto
opt = optimize(
objective,
logit.((spatial(ε) .+ offset) ./ scale),
LBFGS(),
ConjugateGradient(),
Optim.Options(g_tol=1e-4)
)
spatial(ε) .= scale .* logistic.(Optim.minimizer(opt)) .- offset
Expand Down Expand Up @@ -331,7 +331,7 @@ function update!(ε::SpatialMovingAverage, Λ::AbstractMatrix, V::AbstractVector
opt = optimize(
objective,
logit.((spatial(ε) .+ offset) ./ scale),
LBFGS(),
ConjugateGradient(),
Optim.Options(g_tol=1e-4)
)
spatial(ε) .= scale .* logistic.(Optim.minimizer(opt)) .- offset
Expand Down

0 comments on commit cbe8b90

Please sign in to comment.