Forecasting vs Supervised Learning
¶

Order of Rows¶

  • In forecasting, the ordering of rows does matter
  • In Supervised Learning, the ordering of rows does not matter


* Pitfall * Using Supervised Learning may cause over-optimism in performance evaluation
In [1]:
from sklearn.model_selection import train_test_split

from sktime.datasets import load_airline
from sktime.forecasting.model_selection import temporal_train_test_split
from sktime.utils.plotting import plot_series
In [2]:
y = load_airline()
In [20]:
# training and test data in supervised learning
y_train, y_test = train_test_split(y)
plot_series(y_train.sort_index(), y_test.sort_index(), labels=["y_train", "y_test"]);
In [21]:
# training and teat data in forecasting
y_train, y_test = temporal_train_test_split(y)
plot_series(y_train, y_test, labels=["y_train", "y_test"]);

Data Organization¶

  • In forecasting, the data is organized in sequence
  • In Supervised Learning, the data is ordered by windows


* Pitfall * a lot of boilerplate code to transform forecasting data to Supervised Learning data * a number of implicit hyper-parameters which can lead to "p-value hacking"

Prediction Process¶

  • Pitfall
    • Supervised regressor's outputs have to be transformed back into forecasts

Reference¶

  • Examples