StatisticsPerIntervalModel¶
- class StatisticsPerIntervalModel(statistics_function: Callable[[numpy.ndarray], float])[source]¶
Bases:
etna.transforms.decomposition.change_points_based.per_interval_models.base.PerIntervalModel
StatisticsPerIntervalModel gets statistics from series and use them for prediction.
Init StatisticsPerIntervalModel.
- Parameters
statistics_function (Callable[[numpy.ndarray], float]) – function to compute statistics from series
- Inherited-members
Methods
fit
(features, target, *args, **kwargs)Fit statistics from given target.
predict
(features, *args, **kwargs)Build prediction from precomputed statistics.
set_params
(**params)Return new object instance with modified parameters.
to_dict
()Collect all information about etna object in dict.
- fit(features: numpy.ndarray, target: numpy.ndarray, *args, **kwargs) etna.transforms.decomposition.change_points_based.per_interval_models.statistics_based.StatisticsPerIntervalModel [source]¶
Fit statistics from given target.
- Parameters
features (numpy.ndarray) – features of the series, will be ignored
target (numpy.ndarray) – target to compute statistics for
- Returns
fitted StatisticsPerIntervalModel
- Return type
self