aeon-toolkit / aeon

A toolkit for machine learning from time series
https://aeon-toolkit.org/
BSD 3-Clause "New" or "Revised" License
979 stars 116 forks source link

[ENH] Forecasting wrappers #1491

Closed TonyBagnall closed 2 weeks ago

TonyBagnall commented 5 months ago

Describe the feature or idea you want to propose

To kick off the review of forecasting and hopeful eventual move away from huge collections of wrappers, I will audit the current state of forecasting, describing what is wrapped and what is implemented (if anything!). This is a WIP

To make this tractable, I will split it into issues and comments

Classes in aeon.forecasting

The model is adapters in base/adapters.

Other forecasters that extend BaseForecaster directly

- Croston: native implementation that converts to numpy

TonyBagnall commented 5 months ago

forecasting.compose

this is a complex module with a lot in it. The structure is inconsistent, and there are multiple variations of inheritance. Most of the code is in the reduce file, so will do that separately.

The base classes are BaseForecaster, _HeterogenousEnsembleForecaster, _HeterogenousMetaEstimator and _DelegatedForecaster

extend just BaseForecaster

-BaggingForecaster

extend _HeterogenousEnsembleForecaster
extend _DelegatedForecaster
extend _DelegatedForecaster and _HeterogenousMetaEstimator

-MultiplexForecaster

extend _HeterogenousMetaEstimator, BaseForecaster
extend _DelegatedForecaster, BaseForecaster, _HeterogenousMetaEstimator
TonyBagnall commented 5 months ago

forecasting.compose.reduce.py

these are meant for forecasting using sliding windows to reduce it to a regression problem

model is everything extends _BaseWindowForecaster which is a BaseForecaster

_BaseWindowForecaster: private methods _predict, _predict_fixed_cutoff, _predict_in_sample, _predict_last_window, _get_last_window and _predict_nan
_Reducer extends _BaseWindowForecaster. Undocumented, stores

estimator, window_length=10, transformers=None, pooling="local", private methods _is_predictable, _predict_in_sample, _get_shifted_window

all this is accessed through make_reduction:

" During fitting, a sliding-window approach is used to first transform the time series into tabular or panel data, which is then used to fit a tabular or time-series regression estimator. During prediction, the last available data is used as input to the fitted regression estimator to generate forecasts."

TonyBagnall commented 5 months ago

forecasting.stream

these extend _DelegatedForecasters, and wrap a forecaster. Strange naming;

TonyBagnall commented 5 months ago

forecasting.online_learning

TonyBagnall commented 5 months ago

forecasting.model_evaluation

single function evaluate

forecasting.model_selection._split

contains window splitters that extend BaseSplitter.

then a function temporal_train_test_split

TonyBagnall commented 5 months ago

forecasting.model._tune

TonyBagnall commented 2 weeks ago

REALLY KILL WITH FIRE