Hyperparameter

PHOTONAI is build for global optimization over a hyperparameter space. Every PipelineElement comes with a set of possible hyperparameters which define this space. The setting of an individual parameter is up to the user. The description of different concepts of hyperparameter types follows:

BooleanSwitch

The switch between True and False.
       
PipelineElement('SVC', hyperparameter={'shrinking': BooleanSwitch()})
       

Categorical

This object handles a categorical parameter.
Parameter type Description
values list List of possible categories
       
PipelineElement('SVC', hyperparameter={'kernel': Categorical(['linear', 'rbf'])})
       

IntegerRange

Handles integer values in given interval [start, stop-1]. Step and num are only used with grid-based optimizers. Random Search, SMAC3 and Scikit-Optimize execute over all integers between start and stop.

Parameter type Description
start int start of the interval
stop int end of the interval
step int steps between values
num int maximum possible numbers
kwargs dict further parameters
       
PipelineElement('PCA', hyperparameter={'n_components': IntegerRange(5, 20)})
       

FloatRange

Handles continuous numerical values in given interval [start, stop]. Step and num are only used with grid-based optimizers. We recommend the setting of num parameter for grid-based optimizers. Random Search, SMAC3 and scikit-optimize execute over the continuous interval [start, stop].

Parameter type Description
start number start of the interval
stop number end of the interval
range_type str one of ['linspace', 'logspace', 'geomspace'] distribution strategies
num int maximum possible numbers
kwargs dict further parameters
       
PipelineElement('SVC', hyperparameter={'C': FloatRange(start=0.5,
                                                       stop=2,
                                                       range_type='linspace',
                                                       num=50)})
       

Take a look at the implementation on GitHub