Closed TonyBagnall closed 2 weeks ago
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
_HeterogenousEnsembleForecaster: extends HeterogenousMetaEstimator, BaseForecaster. It contains constructor parameter self.forecasters
and attribute `self.forecastersand private undocumented methods
_check_forecasters,
_fit_forecasters, and
_predict_forecastersand
_update`
_HeterogenousMetaEstimator has no base class. It is around 800 lines long. It has class attributes _steps_attr
(default "_steps"
) and _steps_fitted_attr
, public methods get_params
, set_params
and private partially documented methods _get_fitted_params
, is_composite
, _get_params
, _set_params
, _replace_estimator
, _check_names
, _subset_dict_keys
, _check_estimators
, _coerce_estimator_tuple
, _get_estimator_list
, _get_estimator_tuples, _get_estimator_names, _make_strings_unique, _dunder_concat
and static private method _is_name_and_est
stopping now, too much. There is a lot of weird stuff in here.
_DelegatedForecaster yes also have one of these
-BaggingForecaster
-MultiplexForecaster
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, storesestimator, window_length=10, transformers=None, pooling="local", private methods _is_predictable, _predict_in_sample, _get_shifted_window
DirectTabularRegressionForecaster
and DirectTimeSeriesRegressionForecaster
extend _DirectReducer
extends _Reducer
MultioutputTabularRegressionForecaster
and MultioutputTimeSeriesRegressionForecaster
extend _MultioutputReducer
extends _Reducer
RecursiveTabularRegressionForecaster
and RecursiveTimeSeriesRegressionForecaster
extend _RecursiveReducer
extends _Reducer
DirRecTabularRegressionForecaster
and DirRecTimeSeriesRegressionForecaster
extends _DirRecReducer
extend _Reducer
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."
these extend _DelegatedForecasters
, and wrap a forecaster. Strange naming;
UpdateRefitsEvery
UpdateEvery
DontUpdate
OnlineEnsembleForecaster extends EnsembleForecaster extends EnsembleForecaster extends _HeterogenousEnsembleForecaster wrap forecasters by a weight function these _PredictionWeightedEnsembler which is not a BaseForecaster. They seem completely outside the aeon hierarchy:
HedgeExpertEnsemble not declared in init
NormalHedgeEnsemble
NNLSEnsemble
single function evaluate
contains window splitters that extend BaseSplitter
.
BaseSplitter
extends 'BaseObject this is implemented as a form of iterable using yield and indexes. Has
splitand
_split`, seems somewhat disjoint from the toolkit. Seems to split everything into numpy. Subclasses
CutoffSplitter
SingleWindowSplitter
BaseWindowSplitter
SlidingWindowSplitter extends BaseWindowSplitter
ExpandingWindowSplitter extends BaseWindowSplitter
then a function temporal_train_test_split
BaseGridSearch
extends _DelegatedForecaster
ForecastingGridSearchCV
extends BaseGridSearch
ForecastingRandomizedSearchCV
extends BaseGridSearch
REALLY KILL WITH FIRE
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