Please enable JavaScript.
Coggle requires JavaScript to display documents.
Deep Learning - time series - Coggle Diagram
Deep Learning - time series
Définition
enregistrement à des
intervalles de tmps réguliers
Time Series Forecasting (prédiction)
Modèles stat
: plus simples, moins gourmands en input.
Contexte du modèle très important avec interprétation à évaluer
--> modèle stat = point de départ
ARIMA
Exponential Smoothing
VAR
Modèles ML
DL: RNN (LSTM, GRU), CNN, Transformer
Applications
Demand, Financial, Energy, E commerce Forecast,
Time Series Statistics
Composants décomposables en 4 graphiques dans le temps: trend, seasonality (petite vague), cyclical (~ season, for business or economic reason - grande vague, ex inflation), residual (noise, ex pic de vente aléatoire)
Modèles de décompo
Choix selon nature de données
Additive
time series = sum of components
Y_t = T_t + S_t+ C_t + I_t :arrow_right: regular waves
Mutiplicative
time series = product of components
Y_t = T_t x S_t x C_t x I_t :arrow_right: exponentional waves
Stationarity - consistency
moyenne ne varie pas au cours du temps.
La moyenne reste
identique
Transfo techniques : non stationary --> stationary ones
Méthodes
enlever tendance. ex Calculer la moyenne au cours du temps :arrow_right: lisser la courbe = tendance, on va la soustraire à la courbe initiale
enlever saisonalité
transfo log :arrow_right: constant variance
différentiation: 1er ordre : enlever les différences entre chaque obs consécutive. Higher order: differencing repeatedly. 1 ou 2 = INAF
Non-stationarity detection
run sequence plots :eye:
summary statistics (are variances constant ?)
augmented Dickey Fullter test
:arrow_right: H0: time series has a unit root = nonstationarity. If :forbidden: H0: stationarity
Autocorrelation
Partial Autocorrelation Function
:straight_ruler: between time series & lagged version of itself (le point précédent ex t-1)
:arrow_right: direct relationship bw obs at dff lags
Example
if a product sells well today, it will likely sell well tomorrow :arrow_right: data autocorrelation
1/ Regression in which we predict y from x1
and x2
, 2/ regression in which we predict x3
from x1 and x2
and
. Basically, we correlate the “parts” of y and x3
that are not predicted by x1 and x2
.
Modèles stats
Autoregressive models AR: short term forecasts
Ex vente_t selon chiffres passés :arrow_right:
poids sur chaque obs passée pour prédire obs_t
:check:
régression linéaire
:books: ARIMA, SARIMA
Moving Average MA
on considère plutôt les erreurs précédentes
Autoregressive Moving Average ARMA
takes into account the value + errors :arrow_rgiht: combo of AR and MA
Seasonal Autoregressive Integrated Moving Average SARIMA (avec différenciation): both short and long term dependencies + seasonal fluctuation
SARIMA(p,d,q)(P,Q,D)_s
p, d,q: non seasonal AR, differencing, MA orders
P,Q, D seasonal AR, differencing, MA orders
s: seasonal composant
Parameters selection
visual inspection
autocorrelation + paritial autocorrelation analysis : plot ACF and PACF :arrow_right: peaks = p, q values. p+q<= 3
grid search (test of several combos) & automated model selection
AIC (Akaike Information Criterion) and BIC (Bayesian Information Criterion) are standard for model selection.
BIC est plus pénalisant à cause de k
AIC: performance +++
BIC: modèle pas trop complexe et juste
Modèle ML - supervisé
Feature engineering
Lagfeatures: include pass observations + target.
Transformation :arrow_right: compatibility
[Date][X]
[d_4][X_4]
[d_5][X_5]
[d_6][X_6]
:heavy_plus_sign: lag = :heavy_minus_sign: observations
Rolling window statistics
Build time based functions
cercle trigo :arrow_right: cyclicité du modèle
Hour
cos
=cos(2 x pi x Hour)/(max(Hour))
sin
Modèles
RNN
-vanishing/exploding gradient
-gourmand en données
-short memory
subarchiectures: LSTM and GRU :arrow_lower_right: vanishing gradient
gates
:arrow_right: allow selective memory
Gates explained
https://www.pluralsight.com/resources/blog/guides/introduction-to-lstm-units-in-rnn