facet.selection.MultiEstimatorParameterSpace#

class facet.selection.MultiEstimatorParameterSpace(*spaces)[source]#

A collection of parameter spaces, each representing a competing estimator from which to select the best-performing candidate with optimal hyperparameters.

See ParameterSpace for details on setting up and using parameter spaces.

Bases

BaseParameterSpace [+T_Estimator_co]

Generic types

+T_Estimator_co(bound= EstimatorDF, __covariant__=True)

Metaclasses

ABCMeta

Parameters

spaces (ParameterSpace[TypeVar(T_Estimator_co, bound= EstimatorDF, covariant=True)]) – the parameter spaces from which to select the best estimator

Method summary

get_parameters

Generate a list of dictionaries of parameter distributions, compatible with scikit-learn's CV search API (e.g., GridSearchCV or RandomizedSearchCV).

to_expression

Render this object as an expression.

Attribute summary

estimator

The estimator associated with this parameter space.

parameters

The parameter choices (as lists) or distributions (from scipy.stats) that constitute this parameter space.

spaces

The parameter spaces constituting this multi-estimator parameter space.

Definitions

get_parameters(prefix=None)[source]#

Generate a list of dictionaries of parameter distributions, compatible with scikit-learn’s CV search API (e.g., GridSearchCV or RandomizedSearchCV).

Parameters

prefix (Optional[str]) – an optional prefix to prepend to all parameter names in the resulting dictionary, separated by two underscore characters (__) as per scikit-learn’s convention for hierarchical parameter names

Return type

List[Dict[str, Union[List[Any], rv_continuous, rv_discrete]]]

Returns

a list of dictionaries, each mapping parameter names to parameter choices (as lists) or distributions (from scipy.stats)

to_expression()[source]#

Render this object as an expression.

Return type

Expression

Returns

the expression representing this object

property estimator: base.T_Estimator#

The estimator associated with this parameter space.

Return type

TypeVar(T_Estimator, bound= EstimatorDF, covariant=True)

property parameters: Union[List[Dict[str, Union[List[Any], scipy.stats.rv_continuous, scipy.stats.rv_discrete]]], Dict[str, Union[List[Any], scipy.stats.rv_continuous, scipy.stats.rv_discrete]]]#

The parameter choices (as lists) or distributions (from scipy.stats) that constitute this parameter space.

This is a shortcut for calling method get_parameters() with no arguments.

Return type

Union[List[Dict[str, Union[List[Any], rv_continuous, rv_discrete]]], Dict[str, Union[List[Any], rv_continuous, rv_discrete]]]

spaces: Tuple[ParameterSpace[T_Estimator_co], ...]#

The parameter spaces constituting this multi-estimator parameter space.