Blender
- class lightautoml.automl.blend.Blender[source]
Bases:
objectBasic 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, class_mapping)[source]
Wraps custom
._fit_predictmethods of blenders.Method wraps individual
._fit_predictmethod of blenders. If input is single model - take it, else._fit_predictNote - some pipelines may have more than 1 model. So corresponding prediction dataset have multiple prediction cols.- Parameters:
predictions (
Sequence[LAMLDataset]) – Sequence of datasets with predictions.pipes (
Sequence[MLPipeline]) – Sequence of pipelines.class_mapping (
Dict) – Mapping for target classes.
- Return type:
- Returns:
Single prediction dataset and sequence of pruned pipelines.
- predict(predictions)[source]
Wraps custom
._fit_predictmethods of blenders.- Parameters:
predictions (
Sequence[LAMLDataset]) – Sequence of predictions from pruned datasets.- Return type:
- 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:
- Returns:
Split predictions, model indices, pipe indices.
- score(dataset)[source]
Score metric for blender.
- Parameters:
dataset (
LAMLDataset) – Blended predictions dataset.- Return type:
- Returns:
Metric value.