Using Optim.jl

SemOptimizerOptim implements the connection to Optim.jl. It takes two arguments, algorithm and options. The defaults are LBFGS as the optimization algorithm and the standard options from Optim.jl. We can load the Optim and LineSearches packages to choose something different:

using Optim, LineSearches

my_optimizer = SemOptimizerOptim(
    algorithm = BFGS(
        linesearch = BackTracking(order=3), 
        alphaguess = InitialHagerZhang()
        ),
    options = Optim.Options(show_trace = true) 
    )

A model with this optimizer object will use BFGS (!not L-BFGS) with a back tracking linesearch and a certain initial step length guess. Also, the trace of the optimization will be printed to the console.

For a list of all available algorithms and options, we refer to this page of the Optim.jl manual.