JuliaNLSolvers / Optim.jl

Optimization functions for Julia
Other
1.12k stars 217 forks source link

Allow univariate nelder mead. #966

Closed pkofod closed 2 years ago

pkofod commented 2 years ago

Fixes #965

julia> optimize(x->x[1]^2, [4.0])
 * Status: success

 * Candidate solution
    Final objective value:     3.187452e-09

 * Found with
    Algorithm:     Nelder-Mead

 * Convergence measures
    √(Σ(yᵢ-ȳ)²)/n ≤ 1.0e-08

 * Work counters
    Seconds run:   0  (vs limit Inf)
    Iterations:    11
    f(x) calls:    25
cossio commented 2 years ago

It was only a matter of removing the coded restriction and it just works. Nice.

Assuming all tests pass, can you tag a release with this after merging?

codecov[bot] commented 2 years ago

Codecov Report

Merging #966 (ffe114a) into master (f5f03d4) will decrease coverage by 0.01%. The diff coverage is n/a.

:exclamation: Current head ffe114a differs from pull request most recent head 84f31b9. Consider uploading reports for the commit 84f31b9 to get more accurate results Impacted file tree graph

@@            Coverage Diff             @@
##           master     #966      +/-   ##
==========================================
- Coverage   83.89%   83.88%   -0.02%     
==========================================
  Files          42       42              
  Lines        3068     3066       -2     
==========================================
- Hits         2574     2572       -2     
  Misses        494      494              
Impacted Files Coverage Δ
src/multivariate/optimize/optimize.jl 90.00% <ø> (+1.29%) :arrow_up:
...c/multivariate/solvers/zeroth_order/nelder_mead.jl 85.35% <ø> (ø)
...ultivariate/solvers/zeroth_order/particle_swarm.jl 98.78% <0.00%> (-0.41%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update f5f03d4...84f31b9. Read the comment docs.

pkofod commented 2 years ago

Assuming all tests pass, can you tag a release with this after merging?

I plan to yes. It appears that the nightly tests are very very slow to finish but I won't let that stop this PR. maybe it's some inference thing going bad.