Fork me on GitHub

bolero.optimizer.Optimizer

class bolero.optimizer.Optimizer[source]

Common interface for (non-contextual) optimizers.

__init__()

x.__init__(…) initializes x; see help(type(x)) for signature

get_args()

Get parameters for this estimator.

Returns:
params : mapping of string to any

Parameter names mapped to their values.

get_best_parameters()[source]

Get best individual/parameter vector so far.

Returns:
p : array_like, shape (n_params,)

Best parameter vector so far

get_next_parameters(params)[source]

Get next individual/parameter vector for evaluation.

Parameters:
params : array_like, shape (n_params,)

Parameter vector, will be modified

init(n_params)[source]

Initialize the behavior search.

Parameters:
n_params : int

dimension of the parameter vector

is_behavior_learning_done()[source]

Check if the optimization is finished.

Returns:
finished : bool

Is the learning of a behavior finished?

set_evaluation_feedback(rewards)[source]

Set feedbacks for the parameter vector.

Parameters:
rewards : list of float

feedbacks for each step or for the episode, depends on the problem