Search in sources :

Example 6 with CMAESOptimizer

use of org.apache.commons.math3.optim.nonlinear.scalar.noderiv.CMAESOptimizer in project GDSC-SMLM by aherbert.

the class JumpDistanceAnalysis method createCMAESOptimizer.

private CMAESOptimizer createCMAESOptimizer() {
    double rel = 1e-8;
    double abs = 1e-10;
    int maxIterations = 2000;
    //Double.NEGATIVE_INFINITY;
    double stopFitness = 0;
    boolean isActiveCMA = true;
    int diagonalOnly = 20;
    int checkFeasableCount = 1;
    RandomGenerator random = new Well19937c();
    boolean generateStatistics = false;
    ConvergenceChecker<PointValuePair> checker = new SimpleValueChecker(rel, abs);
    // Iterate this for stability in the initial guess
    return new CMAESOptimizer(maxIterations, stopFitness, isActiveCMA, diagonalOnly, checkFeasableCount, random, generateStatistics, checker);
}
Also used : CMAESOptimizer(org.apache.commons.math3.optim.nonlinear.scalar.noderiv.CMAESOptimizer) Well19937c(org.apache.commons.math3.random.Well19937c) SimpleValueChecker(org.apache.commons.math3.optim.SimpleValueChecker) RandomGenerator(org.apache.commons.math3.random.RandomGenerator) PointValuePair(org.apache.commons.math3.optim.PointValuePair)

Aggregations

PointValuePair (org.apache.commons.math3.optim.PointValuePair)6 CMAESOptimizer (org.apache.commons.math3.optim.nonlinear.scalar.noderiv.CMAESOptimizer)6 TooManyEvaluationsException (org.apache.commons.math3.exception.TooManyEvaluationsException)5 TooManyIterationsException (org.apache.commons.math3.exception.TooManyIterationsException)5 InitialGuess (org.apache.commons.math3.optim.InitialGuess)5 MaxEval (org.apache.commons.math3.optim.MaxEval)5 OptimizationData (org.apache.commons.math3.optim.OptimizationData)5 SimpleBounds (org.apache.commons.math3.optim.SimpleBounds)5 ObjectiveFunction (org.apache.commons.math3.optim.nonlinear.scalar.ObjectiveFunction)5 ConvergenceException (org.apache.commons.math3.exception.ConvergenceException)4 SimpleValueChecker (org.apache.commons.math3.optim.SimpleValueChecker)4 RandomGenerator (org.apache.commons.math3.random.RandomGenerator)4 CustomPowellOptimizer (org.apache.commons.math3.optim.nonlinear.scalar.noderiv.CustomPowellOptimizer)3 Well19937c (org.apache.commons.math3.random.Well19937c)3 MultivariateMatrixFunction (org.apache.commons.math3.analysis.MultivariateMatrixFunction)2 LeastSquaresBuilder (org.apache.commons.math3.fitting.leastsquares.LeastSquaresBuilder)2 Optimum (org.apache.commons.math3.fitting.leastsquares.LeastSquaresOptimizer.Optimum)2 LeastSquaresProblem (org.apache.commons.math3.fitting.leastsquares.LeastSquaresProblem)2 LevenbergMarquardtOptimizer (org.apache.commons.math3.fitting.leastsquares.LevenbergMarquardtOptimizer)2 DiagonalMatrix (org.apache.commons.math3.linear.DiagonalMatrix)2