ComposableEstimatorMixin

class ComposableEstimatorMixin[source]

Handles parameter management for estimators composed of named estimators.

Parts (i.e. get_params and set_params) adapted or copied from the scikit-learn _BaseComposition class in utils/metaestimators.py.

Methods

get_fitted_params([deep])

Get fitted parameters.

get_params([deep])

Get parameters for this estimator.

set_params(**params)

Set the parameters of this estimator.

get_params(deep=True)[source]

Get parameters for this estimator.

Returns the parameters given in the constructor as well as the estimators contained within the composable estimator if deep.

Parameters:
deepbool, default=True

If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns:
paramsmapping of string to any

Parameter names mapped to their values.

set_params(**params)[source]

Set the parameters of this estimator.

Valid parameter keys can be listed with get_params(). Note that you can directly set the parameters of the estimators contained composable estimator using their assigned name.

Parameters:
**kwargsdict

Parameters of this estimator or parameters of estimators contained within the composable estimator. Parameters of the estimators may be set using its name and the parameter name separated by a ‘__’.

Returns:
selfestimator instance

Estimator instance.

get_fitted_params(deep=True)[source]

Get fitted parameters.

State required:

Requires state to be “fitted”.

Parameters:
deepbool, default=True

If True, will return the fitted parameters for this estimator and contained subobjects that are estimators.

Returns:
fitted_paramsdict

Fitted parameter names mapped to their values.