TabularMLAlgo

class lightautoml.ml_algo.base.TabularMLAlgo(default_params=None, freeze_defaults=True, timer=None, optimization_search_space={})[source]

Bases: MLAlgo

Machine learning algorithms that accepts numpy arrays as input.

fit_predict_single_fold(train, valid)[source]

Train on train dataset and predict on holdout dataset.

Parameters:
Return type:

Tuple[Any, ndarray]

Returns: # noqa: DAR202

Target predictions for valid dataset.

fit_predict(train_valid_iterator)[source]

Fit and then predict accordig the strategy that uses train_valid_iterator.

If item uses more then one time it will predict mean value of predictions. If the element is not used in training then the prediction will be numpy.nan for this item

Parameters:

train_valid_iterator (TrainValidIterator) – Classic cv-iterator.

Return type:

NumpyDataset

Returns:

Dataset with predicted values.

predict_single_fold(model, dataset)[source]

Implements prediction on single fold.

Parameters:
Return type:

ndarray

Returns: # noqa: DAR202

Predictions for input dataset.

predict(dataset)[source]

Mean prediction for all fitted models.

Parameters:

dataset (Union[NumpyDataset, CSRSparseDataset, PandasDataset]) – Dataset used for prediction.

Return type:

NumpyDataset

Returns:

Dataset with predicted values.