SciML / SciML/Optimization.jl

Weird solution output when using CMAEvolutionStrategyOpt

Open
#207 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
839
Forks
100
Avg merge
20h 43m
Merged PRs (30d)
38

Description

Hello,

I am facing weird behavior.

I created an optimization problem using the CMAEvolutionStrategy and the solution converges well however the solution returned by the solve function does not make sense.

To illustrate follow an example:

prob = GalacticOptim.OptimizationProblem(f, zeros(10), 0, lb = [0,0,0,0,0,0,0,0,-10000,-100000], ub = [100000,100000,100000,100000,100000,100000,100000,100000,100000,100000])
sol = solve(prob, CMAEvolutionStrategyOpt())

The output follows:

(5_w,10)-aCMA-ES (mu_w=3.2,w_1=46%) in dimension 10 (seed=12407866847133021076, 2022-01-26T19:16:31.676)
termination reason: ftol = 1.0e-11 (2022-01-26T19:16:31.676)
lowest observed function value: 0.007262179113661276 at [15110.321539157605, 6389.276175386276, 3870.605784496619, 7219.3109653439005, 7169.368267457494, 1681.165885102548, 1653.143727555849, 1147.010968662311, -9999.398107969057, 75792.44027199461]
population mean: [15110.321538904045, 6389.2761742929215, 3870.6057870883096, 7219.31096515735, 7169.368271111821, 1681.1658851770567, 1653.1437285426043, 1147.0109687943932, -9999.398109584728, 75792.44027520194]

However, the sol vector is:

u: 10-element Vector{Float64}:
-15110.421539157604
-6389.376175386276
3870.605784496619
7219.3109653439005

-1147.1109686623108
-10465.352673873995
75792.44027199461

As you can see, the sol vector does not carry the solution for the lowest observed function value and in fact, is completely out of my boundaries. The absolute numbers are very comparable but with different signals.

Is this a bug? Is there any solution for that?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the provided OptimizationProblem with solve(prob, CMAEvolutionStrategyOpt()) and compare the returned sol vector with the optimizer output's lowest observed function value and population mean. Check whether the returned vector preserves the reported signs and respects the supplied lower and upper bounds; done means the returned solution corresponds to the reported optimum and remains within bounds.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.