NestedTabularMLPipeline
- class lightautoml.pipelines.ml.nested_ml_pipe.NestedTabularMLPipeline(ml_algos, force_calc=True, pre_selection=None, features_pipeline=None, post_selection=None, cv=1, n_folds=None, inner_tune=False, refit_tuner=False)[source]
Bases:
MLPipeline
Wrapper for MLPipeline to make it trainable over nested folds.
Limitations:
Only for TabularMLAlgo
Nested trained only MLAlgo. FeaturesPipelines and SelectionPipelines are trained as usual.
- Parameters:
ml_algos (
Sequence
[Union
[TabularMLAlgo
,Tuple
[TabularMLAlgo
,ParamsTuner
]]]) – Sequence of MLAlgo’s or Pair - (MlAlgo, ParamsTuner).force_calc (
Union
[bool
,Sequence
[bool
]]) – Flag if single fold ofMlAlgo
should be calculated anyway.pre_selection (
Optional
[SelectionPipeline
]) – Initial feature selection. IfNone
there is no initial selection.features_pipeline (
Optional
[FeaturesPipeline
]) – Composition of feature transforms.post_selection (
Optional
[SelectionPipeline
]) – Post feature selection. IfNone
there is no post selection.cv (
int
) – Nested folds cv split.n_folds (
Optional
[int
]) – Limit of valid iterations from cv.inner_tune (
bool
) – Should we refit tuner each inner cv run or tune ones on outer cv.refit_tuner (
bool
) – Should we refit tuner each inner loop withinner_tune==True
.