Regression#

class oats.models.predictive.regression.RegressionModel(window: int = 10, n_steps: int = 1, lags: int = 1, val_split: float = 0.2, **kwargs)[source]#

Bases: SimpleDartsModel

Linear Regression Model

Using linear regression as a predictor. Anomalies scores are deviations from predictions.

Reference: https://unit8co.github.io/darts/generated_api/darts.models.forecasting.regression.html

initialization also accepts any parameters used by: https://unit8co.github.io/darts/generated_api/darts.models.forecasting.regression.html

Parameters:
  • window (int, optional) – rolling window size to feed into the predictor. Defaults to 10.

  • n_steps (int, optional) – number of steps to predict forward. Defaults to 1.

  • lags (int, optional) – number of lags. Defaults to 1.

  • val_split (float, optional) – proportion of data points reserved for validation; only used if using auto-tuning (not tested). Defaults to 0.

fit(train_data: ndarray[Any, dtype[Any]], *args, **kwargs)#
get_scores(test_data: ndarray[Any, dtype[Any]]) Tuple[ndarray[Any, dtype[Any]]]#