tuner#

Base Tuner class.

Module Contents#

Classes Summary#

Tuner

Base Tuner class.

Contents#

class evalml.tuners.tuner.Tuner(pipeline_hyperparameter_ranges, random_seed=0)[source]#

Base Tuner class.

Tuners implement different strategies for sampling from a search space. They’re used in EvalML to search the space of pipeline hyperparameters.

Parameters
  • pipeline_hyperparameter_ranges (dict) – a set of hyperparameter ranges corresponding to a pipeline’s parameters.

  • random_seed (int) – The random state. Defaults to 0.

Methods

add

Register a set of hyperparameters with the score obtained from training a pipeline with those hyperparameters.

get_starting_parameters

Gets the starting parameters given the pipeline hyperparameter range.

is_search_space_exhausted

Optional. If possible search space for tuner is finite, this method indicates whether or not all possible parameters have been scored.

propose

Returns a suggested set of parameters to train and score a pipeline with, based off the search space dimensions and prior samples.

abstract add(self, pipeline_parameters, score)[source]#

Register a set of hyperparameters with the score obtained from training a pipeline with those hyperparameters.

Parameters
  • pipeline_parameters (dict) – a dict of the parameters used to evaluate a pipeline

  • score (float) – the score obtained by evaluating the pipeline with the provided parameters

Returns

None

get_starting_parameters(self, hyperparameter_ranges, random_seed=0)[source]#

Gets the starting parameters given the pipeline hyperparameter range.

Parameters
  • hyperparameter_ranges (dict) – The custom hyperparameter ranges passed in during search. Used to determine the starting parameters.

  • random_seed (int) – The random seed to use. Defaults to 0.

Returns

The starting parameters, randomly chosen, to initialize a pipeline with.

Return type

dict

is_search_space_exhausted(self)[source]#

Optional. If possible search space for tuner is finite, this method indicates whether or not all possible parameters have been scored.

Returns

Returns true if all possible parameters in a search space has been scored.

Return type

bool

abstract propose(self)[source]#

Returns a suggested set of parameters to train and score a pipeline with, based off the search space dimensions and prior samples.

Returns

Proposed pipeline parameters

Return type

dict