SklearnPerSegmentModel

class SklearnPerSegmentModel(regressor: sklearn.base.RegressorMixin)[source]

Bases: etna.models.mixins.PerSegmentModelMixin, etna.models.mixins.NonPredictionIntervalContextIgnorantModelMixin, etna.models.base.NonPredictionIntervalContextIgnorantAbstractModel

Class for holding per segment Sklearn model.

Create instance of SklearnPerSegmentModel with given parameters.

Parameters

regressor (sklearn.base.RegressorMixin) – sklearn model for regression

Inherited-members

Methods

fit(ts)

Fit model.

forecast(ts[, return_components])

Make predictions.

get_model()

Get internal models that are used inside etna class.

load(path)

Load an object.

params_to_tune()

Get grid for tuning hyperparameters.

predict(ts[, return_components])

Make predictions with using true values as autoregression context if possible (teacher forcing).

save(path)

Save the object.

set_params(**params)

Return new object instance with modified parameters.

to_dict()

Collect all information about etna object in dict.

Attributes

context_size

Context size of the model.