◐APLab.academy
КурсыИнструментыPremium
··
Войти
APLAB.ACADEMY © 2026 · BUILT BY AP LAB
КУРСЫИНСТРУМЕНТЫКОНФИДЕНЦИАЛЬНОСТЬУСЛОВИЯ
ADVANCED ML: UNSUPERVISED LEARNING & PRODUCTION / L07 — TIME SERIES ANALYSIS: ARIMA, PROPHET, ML FORECASTING07 / 12 · ███████████░░░░░░░░░ 58%
УРОКИ · 12
01Clustering Algorithms: K-Means, DBSCAN, Hierarchical02Dimensionality Reduction: PCA, t-SNE, UMAP03Anomaly Detection: Isolation Forest & One-Class SVM04Gaussian Mixture Models & EM Algorithm05Neural Networks Fundamentals: Perceptrons to Backpropagation06Deep Learning Basics: Architectures & Training07Time Series Analysis: ARIMA, Prophet, ML Forecasting08Reinforcement Learning Introduction: Q-Learning & Agents09Model Deployment: API Design & Serving Infrastructure10MLOps Fundamentals: Pipelines, Monitoring, Versioning11Model Optimization: Quantization, Pruning, Distillation12Production Best Practices: A/B Testing, Drift, Debugging
НА ЭТОЙ СТРАНИЦЕ
Introduction: Predicting the FutureLearning Objectives1. Time Series ComponentsDecomposition2. Simple Forecasting MethodsMoving AverageExponential Smoothing3. ARIMA Models
УРОКИ · 12 · 07 / 12▾
01Clustering Algorithms: K-Means, DBSCAN, Hierarchical02Dimensionality Reduction: PCA, t-SNE, UMAP03Anomaly Detection: Isolation Forest & One-Class SVM04Gaussian Mixture Models & EM Algorithm05Neural Networks Fundamentals: Perceptrons to Backpropagation06Deep Learning Basics: Architectures & Training07Time Series Analysis: ARIMA, Prophet, ML Forecasting08Reinforcement Learning Introduction: Q-Learning & Agents09Model Deployment: API Design & Serving Infrastructure10MLOps Fundamentals: Pipelines, Monitoring, Versioning11Model Optimization: Quantization, Pruning, Distillation12Production Best Practices: A/B Testing, Drift, Debugging
LESSON 07 · ADVANCED · 60 MIN · ◆ 1 INSTRUMENT

Time Series Analysis: ARIMA, Prophet, ML Forecasting

Forecast time series data using classical methods (ARIMA) and modern ML approaches (Prophet, LSTMs). Practical forecasting applications.

Introduction: Predicting the Future

Stock prices, weather temperatures, website traffic, energy consumption – all change over time. Time series data has a temporal dimension that traditional ML ignores!

Key Challenge: Past values influence future values. We need models that capture temporal dependencies.

Learning Objectives

  • Understand time series components (trend, seasonality, noise)
  • Master ARIMA models for forecasting
  • Apply exponential smoothing
  • Handle temporal cross-validation
  • Build forecasting pipelines
  • Evaluate forecast accuracy

1. Time Series Components

Decomposition

Any time series can be decomposed into:

  1. Trend: Long-term increase or decrease
  2. Seasonality: Regular patterns (daily, weekly, yearly)
  3. Residual: Random noise
FIG. 02Python Code Executor
INTERACTIVE
LOADING INSTRUMENT
Fig. 02Interactive Python code execution environment

2. Simple Forecasting Methods

Moving Average

FIG. 04Python Code Executor
INTERACTIVE
LOADING INSTRUMENT
Fig. 04Interactive Python code execution environment

Exponential Smoothing

FIG. 06Python Code Executor
INTERACTIVE
LOADING INSTRUMENT
Fig. 06Interactive Python code execution environment

3. ARIMA Models

ARIMA(p, d, q): AutoRegressive Integrated Moving Average

  • p: Order of autoregression (AR)
  • d: Degree of differencing
  • q: Order of moving average (MA)

AR (AutoRegressive)

yt=c+ϕ1yt−1+ϕ2yt−2+...+ϕpyt−p+ϵty_t = c + \phi_1 y_{t-1} + \phi_2 y_{t-2} + ... + \phi_p y_{t-p} + \epsilon_tyt​=c+ϕ1​yt−1​+ϕ2​yt−2​+...+ϕp​yt−p​+ϵt​

MA (Moving Average)

yt=μ+ϵt+θ1ϵt−1+...+θqϵt−qy_t = \mu + \epsilon_t + \theta_1 \epsilon_{t-1} + ... + \theta_q \epsilon_{t-q}yt​=μ+ϵt​+θ1​ϵt−1​+...+θq​ϵt−q​
FIG. 08Python Code Executor
INTERACTIVE
LOADING INSTRUMENT
Fig. 08Interactive Python code execution environment

4. Temporal Cross-Validation

Critical: Never shuffle time series data! Use forward chaining (walk-forward validation).

FIG. 10Python Code Executor
INTERACTIVE
LOADING INSTRUMENT
Fig. 10Interactive Python code execution environment

5. Forecast Evaluation Metrics

FIG. 12Python Code Executor
INTERACTIVE
LOADING INSTRUMENT
Fig. 12Interactive Python code execution environment

Key Takeaways

✅ Time series has temporal dependencies – order matters!

✅ Components: Trend + Seasonality + Residual

✅ ARIMA models: Flexible framework for time series forecasting

✅ Temporal CV: Use forward chaining, never shuffle

✅ Metrics: MAE, RMSE, MAPE for forecast accuracy


What's Next?

Next lesson: Reinforcement Learning Introduction – agents, rewards, and learning optimal policies!


Further Reading

Interactive Visualizations

  • Forecasting: Principles and Practice (3rd ed.) — Hyndman & Athanasopoulos. Free, open-access textbook with R companion. Run the code in your browser.
  • Distill — Visual Information Theory — neighbor topic; deepens your intuition for residuals and entropy.
  • Facebook NeuralProphet — Live Demo — interactive time-series notebooks combining classical decomposition with deep learning.

Video Tutorials

  • StatQuest — Time Series Forecasting Series (Josh Starmer).
  • Rob Hyndman — Forecasting Lectures — author of Forecasting: Principles and Practice.

Papers & Articles

  • Forecasting at Scale (Prophet paper) — Taylor & Letham, Facebook 2017. The model behind prophet.
  • N-BEATS: Neural Basis Expansion Analysis for Time Series Forecasting — Oreshkin et al., ICLR 2020. Strong neural baseline.
  • Temporal Fusion Transformers for Interpretable Multi-horizon Time Series Forecasting — Lim et al., 2021. The state-of-the-art transformer for time series.
  • Are Transformers Effective for Time Series Forecasting? — Zeng et al., AAAI 2023. The provocative paper that brought back simple linear baselines (DLinear).
  • Chronos: Learning the Language of Time Series — Ansari et al., 2024. Foundation models for time series.

Documentation & Books

  • Book: Forecasting: Principles and Practice — Hyndman & Athanasopoulos (free online).
  • statsmodels — Time Series Analysis — Python's classical-stats workhorse.
  • Nixtla statsforecast, neuralforecast — modern, fast forecasting libraries.
  • Darts — unified Python API for classical + deep-learning time series models.
СВЯЗАННЫЕ ПОНЯТИЯ
time-seriesarimaprophetforecasting
← НАЗАД
06. Deep Learning Basics: Architectures & Training
ДАЛЕЕ →
08. Reinforcement Learning Introduction: Q-Learning & Agents
ПРИБОРЫ НА СТРАНИЦЕ · 01
FIG. 02 · INTERACTIVE
Python Code Executor
ВАШИ ЗАМЕТКИ