@Deprecated public class CMAESOptimizer extends BaseAbstractMultivariateSimpleBoundsOptimizer<MultivariateFunction> implements MultivariateOptimizer
An implementation of the active Covariance Matrix Adaptation Evolution Strategy (CMA-ES) for non-linear, non-convex, non-smooth, global function minimization. The CMA-Evolution Strategy (CMA-ES) is a reliable stochastic optimization method which should be applied if derivative-based methods, e.g. quasi-Newton BFGS or conjugate gradient, fail due to a rugged search landscape (e.g. noise, local optima, outlier, etc.) of the objective function. Like a quasi-Newton method, the CMA-ES learns and applies a variable metric on the underlying search space. Unlike a quasi-Newton method, the CMA-ES neither estimates nor uses gradients, making it considerably more reliable in terms of finding a good, or even close to optimal, solution.
In general, on smooth objective functions the CMA-ES is roughly ten times slower than BFGS (counting objective function evaluations, no gradients provided). For up to variables also the derivative-free simplex direct search method (Nelder and Mead) can be faster, but it is far less reliable than CMA-ES.
The CMA-ES is particularly well suited for non-separable and/or badly conditioned problems. To observe the advantage of CMA compared to a conventional evolution strategy, it will usually take about function evaluations. On difficult problems the complete optimization (a single run) is expected to take roughly between and function evaluations.
This implementation is translated and adapted from the Matlab version
 of the CMA-ES algorithm as implemented in module cmaes.m version 3.51.
| Modifier and Type | Class and Description | 
|---|---|
| static class  | CMAESOptimizer.PopulationSizeDeprecated.  Population size. | 
| static class  | CMAESOptimizer.SigmaDeprecated.  Input sigma values. | 
| Modifier and Type | Field and Description | 
|---|---|
| static int | DEFAULT_CHECKFEASABLECOUNTDeprecated.  Default value for  checkFeasableCount: 0. | 
| static int | DEFAULT_DIAGONALONLYDeprecated.  Default value for  diagonalOnly: 0. | 
| static boolean | DEFAULT_ISACTIVECMADeprecated.  Default value for  isActiveCMA: true. | 
| static int | DEFAULT_MAXITERATIONSDeprecated.  Default value for  maxIterations: 30000. | 
| static RandomGenerator | DEFAULT_RANDOMGENERATORDeprecated.  Default value for  random. | 
| static double | DEFAULT_STOPFITNESSDeprecated.  Default value for  stopFitness: 0.0. | 
evaluations| Constructor and Description | 
|---|
| CMAESOptimizer()Deprecated. 
 As of version 3.1: Parameter  lambdamust be
 passed with the call tooptimize(whereas in the current code it is set to an undocumented value). | 
| CMAESOptimizer(int lambda)Deprecated. 
 As of version 3.1: Parameter  lambdamust be
 passed with the call tooptimize(whereas in the current code it is set to an undocumented value).. | 
| CMAESOptimizer(int lambda,
              double[] inputSigma)Deprecated. 
 | 
| CMAESOptimizer(int lambda,
              double[] inputSigma,
              int maxIterations,
              double stopFitness,
              boolean isActiveCMA,
              int diagonalOnly,
              int checkFeasableCount,
              RandomGenerator random,
              boolean generateStatistics)Deprecated. 
 | 
| CMAESOptimizer(int lambda,
              double[] inputSigma,
              int maxIterations,
              double stopFitness,
              boolean isActiveCMA,
              int diagonalOnly,
              int checkFeasableCount,
              RandomGenerator random,
              boolean generateStatistics,
              ConvergenceChecker<PointValuePair> checker)Deprecated. 
 | 
| CMAESOptimizer(int maxIterations,
              double stopFitness,
              boolean isActiveCMA,
              int diagonalOnly,
              int checkFeasableCount,
              RandomGenerator random,
              boolean generateStatistics,
              ConvergenceChecker<PointValuePair> checker)Deprecated.  | 
| Modifier and Type | Method and Description | 
|---|---|
| protected PointValuePair | doOptimize()Deprecated.  Perform the bulk of the optimization algorithm. | 
| List<RealMatrix> | getStatisticsDHistory()Deprecated.  | 
| List<Double> | getStatisticsFitnessHistory()Deprecated.  | 
| List<RealMatrix> | getStatisticsMeanHistory()Deprecated.  | 
| List<Double> | getStatisticsSigmaHistory()Deprecated.  | 
| protected PointValuePair | optimizeInternal(int maxEval,
                MultivariateFunction f,
                GoalType goalType,
                OptimizationData... optData)Deprecated.  Optimize an objective function. | 
optimize, optimizecomputeObjectiveValue, getConvergenceChecker, getEvaluations, getGoalType, getLowerBound, getMaxEvaluations, getStartPoint, getUpperBound, optimize, optimizeInternalclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitoptimizegetConvergenceChecker, getEvaluations, getMaxEvaluationspublic static final int DEFAULT_CHECKFEASABLECOUNT
checkFeasableCount: 0.public static final double DEFAULT_STOPFITNESS
stopFitness: 0.0.public static final boolean DEFAULT_ISACTIVECMA
isActiveCMA: true.public static final int DEFAULT_MAXITERATIONS
maxIterations: 30000.public static final int DEFAULT_DIAGONALONLY
diagonalOnly: 0.public static final RandomGenerator DEFAULT_RANDOMGENERATOR
random.@Deprecated public CMAESOptimizer()
lambda must be
 passed with the call to optimize (whereas in the current code it is set to an undocumented value).@Deprecated public CMAESOptimizer(int lambda)
lambda must be
 passed with the call to optimize (whereas in the current code it is set to an undocumented value)..lambda - Population size.@Deprecated public CMAESOptimizer(int lambda, double[] inputSigma)
lambda and inputSigma must be
 passed with the call to optimize.lambda - Population size.inputSigma - Initial standard deviations to sample new points
 around the initial guess.@Deprecated public CMAESOptimizer(int lambda, double[] inputSigma, int maxIterations, double stopFitness, boolean isActiveCMA, int diagonalOnly, int checkFeasableCount, RandomGenerator random, boolean generateStatistics)
SimpleValueChecker.SimpleValueChecker()lambda - Population size.inputSigma - Initial standard deviations to sample new points
 around the initial guess.maxIterations - Maximal number of iterations.stopFitness - Whether to stop if objective function value is smaller than
 stopFitness.isActiveCMA - Chooses the covariance matrix update method.diagonalOnly - Number of initial iterations, where the covariance matrix
 remains diagonal.checkFeasableCount - Determines how often new random objective variables are
 generated in case they are out of bounds.random - Random generator.generateStatistics - Whether statistic data is collected.@Deprecated public CMAESOptimizer(int lambda, double[] inputSigma, int maxIterations, double stopFitness, boolean isActiveCMA, int diagonalOnly, int checkFeasableCount, RandomGenerator random, boolean generateStatistics, ConvergenceChecker<PointValuePair> checker)
lambda and inputSigma must be
 passed with the call to optimize.lambda - Population size.inputSigma - Initial standard deviations to sample new points
 around the initial guess.maxIterations - Maximal number of iterations.stopFitness - Whether to stop if objective function value is smaller than
 stopFitness.isActiveCMA - Chooses the covariance matrix update method.diagonalOnly - Number of initial iterations, where the covariance matrix
 remains diagonal.checkFeasableCount - Determines how often new random objective variables are
 generated in case they are out of bounds.random - Random generator.generateStatistics - Whether statistic data is collected.checker - Convergence checker.public CMAESOptimizer(int maxIterations,
              double stopFitness,
              boolean isActiveCMA,
              int diagonalOnly,
              int checkFeasableCount,
              RandomGenerator random,
              boolean generateStatistics,
              ConvergenceChecker<PointValuePair> checker)
maxIterations - Maximal number of iterations.stopFitness - Whether to stop if objective function value is smaller than
 stopFitness.isActiveCMA - Chooses the covariance matrix update method.diagonalOnly - Number of initial iterations, where the covariance matrix
 remains diagonal.checkFeasableCount - Determines how often new random objective variables are
 generated in case they are out of bounds.random - Random generator.generateStatistics - Whether statistic data is collected.checker - Convergence checker.public List<Double> getStatisticsSigmaHistory()
public List<RealMatrix> getStatisticsMeanHistory()
public List<Double> getStatisticsFitnessHistory()
public List<RealMatrix> getStatisticsDHistory()
protected PointValuePair optimizeInternal(int maxEval, MultivariateFunction f, GoalType goalType, OptimizationData... optData)
optimizeInternal in class BaseAbstractMultivariateOptimizer<MultivariateFunction>maxEval - Allowed number of evaluations of the objective function.f - Objective function.goalType - Optimization type.optData - Optimization data. The following data will be looked for:
 protected PointValuePair doOptimize()
doOptimize in class BaseAbstractMultivariateOptimizer<MultivariateFunction>Copyright © 2003–2016 The Apache Software Foundation. All rights reserved.