We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
... for rates, and for discrete distributions (ie. with a sum to 1 constraint). Start here: https://github.com/libprima/PRIMA.jl
sum to 1
The text was updated successfully, but these errors were encountered:
Switching from NLopt to PRIMA could look like this for a typical BOBYQA use case
NLopt
opt = Opt(:LN_BOBYQA, num_params) min_objective!(opt, (x,y) -> (objective ∘ unflatten)(x)) lower_bounds!(opt, [-5.0 for i in 1:num_params]) upper_bounds!(opt, [5.0 for i in 1:num_params]) xtol_rel!(opt, 1e-12) score,mini,did_it_work = NLopt.optimize(opt, flat_initial_params) final_params = unflatten(mini) optimized_model = build_model_vec(final_params) LL = log_likelihood!(tree,optimized_model) println(did_it_work) println("Opt LL:",LL)
PRIMA
lower_bounds = [-5.0 for i in 1:num_params] upper_bounds = [5.0 for i in 1:num_params] tr_radius = 1e-12 #trust-region radius mini, info = bobyqa(objective ∘ unflatten, flat_initial_params, xl=lower_bounds, xu=upper_bounds, rhoend=tr_radius) final_params = unflatten(mini) optimized_model = build_model_vec(final_params) LL = log_likelihood!(tree,optimized_model) println("SUCCESS: $(issuccess(info))") println("Opt LL:",LL)
Sorry, something went wrong.
No branches or pull requests
... for rates, and for discrete distributions (ie. with a
sum to 1
constraint). Start here: https://github.com/libprima/PRIMA.jlThe text was updated successfully, but these errors were encountered: