Random Forest#
- class oats.models.predictive.randomforest.RandomForestModel(window: int = 10, n_steps: int = 1, lags: int = 1, val_split: float = 0.2, **kwargs)[source]#
Bases:
SimpleDartsModel
Random Forest Model
Using random forest regression as a predictor. Anomalies scores are deviations from predictions.
Reference: https://unit8co.github.io/darts/generated_api/darts.models.forecasting.random_forest.html
initialization also accepts any parameters used by: https://unit8co.github.io/darts/generated_api/darts.models.forecasting.random_forest.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]]] #