ComposableEstimatorMixin¶
- class ComposableEstimatorMixin(axis)[source]¶
Bases:
ABCHandles parameter management for estimators composed of named estimators.
Parts (i.e. get_params and set_params) adapted from the scikit-learn 1.5.0
_BaseCompositionclass in utils/metaestimators.py. https://github.com/scikit-learn/scikit-learn/ Copyright (c) 2007-2024 The scikit-learn developers, BSD-3Methods
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_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.
- 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.