I wanted to point to a new gist that I have developed to update the Normal Linear Model Maximum Likelihood example that is part of the Optim.jl examples.
I am going over all of my code to make sure it is 0.7.0 compliant by fixing the deprecation warning and other issues.
The public gist is available here:
I guess I could do a PR at Optim.jl correct?
In any event, I hope people find this useful.
Can you maybe clarify what you changed? Does the example in the docs not work, or did you extend it?
“Deprecations” may have been too strong a word, but I needed to add the following:
numerical_hessian = NLSolversBase.hessian!(func,parameters)
temporary = vars -> Log_Likelihood(x, y, vars[1:nvar], vars[nvar + 1])
numerical_hessian2 = ForwardDiff.hessian(temporary, parameters)
The first block was to add the
LinearAlgebra packages to make sure people understood that these were not in
The second code block was amended to
NLSolversBase.hessian! but I’m not sure this is actually needed.
The third block was amended to obtain the Hessian from the
It may be that the only “real” change is to add the calls in the first block, while the others are not necessary.