EnsembleBase Class
Class for ensembling previous AutoML iterations.
The ensemble pipeline is initialized from a collection of already fitted pipelines.
Create an Ensemble pipeline out of a collection of already fitted pipelines.
- Inheritance
-
sklearn.base.BaseEstimatorEnsembleBaseEnsembleBase
Constructor
EnsembleBase(automl_settings: str | Dict[str, Any] | AutoMLBaseSettings, settings_type: Type[SettingsType])
Parameters
Name | Description |
---|---|
automl_settings
Required
|
settings for the AutoML experiments. |
settings_type
Required
|
the type for the settings object. |
Methods
convert_settings |
Convert settings into a settings object. |
fit |
Fit method not implemented. Use the fit_ensemble method instead |
fit_ensemble |
Fit the ensemble based on the existing fitted pipelines. |
predict |
Predicts the target for the provided input. |
predict_proba |
Return the probability estimates for the input dataset. |
convert_settings
Convert settings into a settings object.
convert_settings(automl_settings: str | Dict[str, Any] | AutoMLBaseSettings, settings_type: Type[SettingsType]) -> SettingsType
Parameters
Name | Description |
---|---|
automl_settings
Required
|
settings for the AutoML experiments. |
settings_type
Required
|
the type for the settings object. |
fit
Fit method not implemented.
Use the fit_ensemble method instead
fit(X: Any | None, y: Any | None) -> None
Parameters
Name | Description |
---|---|
X
Required
|
|
y
Required
|
|
Exceptions
Type | Description |
---|---|
NotImplementedError -- Not using this API for ensemble training
|
fit_ensemble
Fit the ensemble based on the existing fitted pipelines.
fit_ensemble(training_type: TrainingType, **kwargs: Any) -> Tuple[BaseEstimator, List[BaseEstimator]]
Parameters
Name | Description |
---|---|
training_type
Required
|
<xref:constants.TrainingType>
Type of training (eg: TrainAndValidate, MeanCrossValidation, etc.) |
Returns
Type | Description |
---|---|
Returns a fitted ensemble including all the selected models. |
predict
Predicts the target for the provided input.
predict(X)
Parameters
Name | Description |
---|---|
X
Required
|
ndarray or
<xref:scipy.sparse.spmatrix>
Input test samples. |
Returns
Type | Description |
---|---|
Prediction values. |
predict_proba
Return the probability estimates for the input dataset.
predict_proba(X)
Parameters
Name | Description |
---|---|
X
Required
|
ndarray or
<xref:scipy.sparse.spmatrix>
Input test samples. |
Returns
Type | Description |
---|---|
Prediction probabilities values. |
Attributes
DOWNLOAD_RETURNED_NO_MODELS_MSG
DOWNLOAD_RETURNED_NO_MODELS_MSG = "Could not find any models for running ensembling. This can happen if the download of models required for ensembling procedure didn't finish within the default timeout. Please use `ensemble_download_models_timeout_sec` parameter in AutoMLConfig to set a larger timeout"
MAXIMUM_MODELS_FOR_SELECTION
MAXIMUM_MODELS_FOR_SELECTION = 50
PIPELINES_TUPLES_ALGORITHM_INDEX
PIPELINES_TUPLES_ALGORITHM_INDEX = 2
PIPELINES_TUPLES_CHILD_RUN_INDEX
PIPELINES_TUPLES_CHILD_RUN_INDEX = 3
PIPELINES_TUPLES_ITERATION_INDEX
PIPELINES_TUPLES_ITERATION_INDEX = 0
PIPELINES_TUPLES_PIPELINE_INDEX
PIPELINES_TUPLES_PIPELINE_INDEX = 1
PIPELINES_TUPLES_PIPELINE_SPEC_INDEX
PIPELINES_TUPLES_PIPELINE_SPEC_INDEX = 4
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for