Fork me on GitHub

bolero.optimizer.ACMESOptimizer

class bolero.optimizer.ACMESOptimizer(initial_params=None, variance=1.0, covariance=None, n_samples_per_update=None, n_pre_samples_per_update=500, active=False, n_start_iter=100, n_train_max=None, n_iter_per_sample=1000, bounds=None, maximize=True, log_to_file=False, log_to_stdout=False, random_state=None)[source]

CMA-ES with ranking SVM as surrogate model.

CMA-ES with comparison-based surrogate model (ranking SVM).

For details, see

The authors of the algorithm were creative with the name: the letters of ACM-ES have the same meaning as in CMA-ES but the order of the first three letters is alphabetically to indicate that it uses a comparison-based surrogate model.

Parameters:
initial_params : array-like, shape = (n_params,), optional (default: 0s)

Initial parameter vector.

variance : float, optional (default: 1.0)

Initial exploration variance.

covariance : array-like, optional (default: None)

Either a diagonal (with shape (n_params,)) or a full covariance matrix (with shape (n_params, n_params)). A full covariance can contain information about the correlation of variables.

n_samples_per_update : integer, optional (default: 4+int(3*log(n_params)))

Number of roll-outs that are required for a parameter update.

n_pre_samples_per_update : int, optional (default: 500)

Number of samples that will be compared with the surrogate model before we select the individuals for a generation

active : bool, optional (default: False)

Active CMA-ES (aCMA-ES) with negative weighted covariance matrix update

n_start_iter : int, optional (default: 100)

Number of iterations before we use the surrogate model

n_train_max : int, optional (default: 40 + int(4 * n_params ** 1.7))

Maximum number of training samples for surrogate model

n_iter_per_sample : int, optional (default: 50000)

Number of iterations per sample for the quadratic programming solver for surrogate model

bounds : array-like, shape (n_samples, 2), optional (default: None)

Upper and lower bounds for each parameter.

maximize : optional, boolean (default: True)

Maximize return or minimize cost?

log_to_file: optional, boolean or string (default: False)

Log results to given file, it will be located in the $BL_LOG_PATH

log_to_stdout: optional, boolean (default: False)

Log to standard output

random_state : int or RandomState, optional (default: None)

Seed for the random number generator or RandomState object.

References

[1](1, 2) Loshchilov, I.; Schoenauer, M.; Sebag, M. Comparison-Based Optimizers Need Comparison-Based Surrogates, Parallel Problem Solving from Nature, 2010.
__init__(initial_params=None, variance=1.0, covariance=None, n_samples_per_update=None, n_pre_samples_per_update=500, active=False, n_start_iter=100, n_train_max=None, n_iter_per_sample=1000, bounds=None, maximize=True, log_to_file=False, log_to_stdout=False, random_state=None)[source]
get_args()

Get parameters for this estimator.

Returns:
params : mapping of string to any

Parameter names mapped to their values.

get_best_parameters(method='best')[source]

Get the best parameters.

Parameters:
method : string, optional (default: ‘best’)

Either ‘best’ or ‘mean’

Returns:
best_params : array-like, shape (n_params,)

Best parameters