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.BaseEstimator
EnsembleBase
EnsembleBase

Constructor

EnsembleBase(automl_settings: str | Dict[str, Any] | AutoMLBaseSettings, settings_type: Type[SettingsType])

Parameters

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

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

X
Required
y
Required

Exceptions

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

training_type
<xref:constants.TrainingType>
Required

Type of training (eg: TrainAndValidate, MeanCrossValidation, etc.)

Returns

Returns a fitted ensemble including all the selected models.

predict

Predicts the target for the provided input.

predict(X)

Parameters

X
ndarray or <xref:scipy.sparse.spmatrix>
Required

Input test samples.

Returns

Prediction values.

predict_proba

Return the probability estimates for the input dataset.

predict_proba(X)

Parameters

X
ndarray or <xref:scipy.sparse.spmatrix>
Required

Input test samples.

Returns

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