Blender

class lightautoml.automl.blend.Blender[source]

Bases: object

Basic class for blending.

Blender learns how to make blend on sequence of prediction datasets and prune pipes, that are not used in final blend.

fit_predict(predictions, pipes)[source]

Wraps custom ._fit_predict methods of blenders.

Method wraps individual ._fit_predict method of blenders. If input is single model - take it, else ._fit_predict Note - some pipelines may have more than 1 model. So corresponding prediction dataset have multiple prediction cols.

Parameters:
Return type:

Tuple[LAMLDataset, Sequence[MLPipeline]]

Returns:

Single prediction dataset and sequence of pruned pipelines.

predict(predictions)[source]

Wraps custom ._fit_predict methods of blenders.

Parameters:

predictions (Sequence[LAMLDataset]) – Sequence of predictions from pruned datasets.

Return type:

LAMLDataset

Returns:

Dataset with predictions.

split_models(predictions)[source]

Split predictions by single model prediction datasets.

Parameters:

predictions (Sequence[LAMLDataset]) – Sequence of datasets with predictions.

Return type:

Tuple[Sequence[LAMLDataset], List[int], List[int]]

Returns:

Split predictions, model indices, pipe indices.

score(dataset)[source]

Score metric for blender.

Parameters:

dataset (LAMLDataset) – Blended predictions dataset.

Return type:

float

Returns:

Metric value.