Time Series Forecasting
1
Upvotes
4
Views
3
Downloads
557
Words
Description
Predict future values from temporal data using ARIMA/SARIMA, ETS, Prophet, or deep-learning models; use for forecasting with uncertainty estimates.
When to Use
How do I forecast a time series going forward? | I need a time-series forecast for my data. | Help me build an ARIMA or Prophet model. | Forecast demand or sales from past data. | Provide forecast with confidence intervals.
Use Cases
Forecast daily sales for the next 30 days. | Predict website traffic for the coming week. | Estimate inventory demand for promotions. | Forecast hourly energy consumption.
SKILL.md Content
---
name: time-series-forecasting
description: "Predict future values from temporal data using ARIMA/SARIMA, ETS, Prophet, or deep-learning models; use for forecasting with uncertainty estimates."
metadata:
tags: "time-series, forecasting, statistical-models, machine-learning, deep-learning, arima-sarima, ensemble-methods"
source: "https://skilldb.dev/skills/ai-ml-skills/time-series-forecasting"
pack: "ai-ml-skills"
category: "Technology & Engineering"
---
# Time Series Forecasting
## When to use this skill
Use when the user says things like:
- "How do I forecast a time series going forward?"
- "I need a time-series forecast for my data."
- "Help me build an ARIMA or Prophet model."
- "Forecast demand or sales from past data."
- "Provide forecast with confidence intervals."
## Core Philosophy
Time series forecasting leverages the inherent structure in temporal data — trends,
seasonality, cycles, and autocorrelation — to predict future values. The fundamental
assumption is that patterns observed in historical data will persist, at least
partially, into the future. Effective forecasting requires understanding both the
signal (repeatable patterns) and the noise (irreducible randomness) in the data.
Good forecasting is as much about quantifying uncertainty as it is about point
predictions. A forecast without a confidence interval is incomplete. Decision-makers
need to know not just what is most likely but what range of outcomes is plausible.
## Key Techniques
- **ARIMA/SARIMA**: Autoregressive integrated moving average models that capture
linear dependencies in stationary (or differenced) time series. SARIMA extends
this to seasonal patterns with additional seasonal terms.
- **Exponential Smoothing (ETS)**: Weighted averages of past observations where
weights decay exponentially. Handles level, trend, and seasonal components with
intuitive smoothing parameters.
- **Prophet**: Facebook's additive regression model designed for business time
series with strong seasonal effects, holidays, and trend changepoints. Robust
to missing data and outliers.
- **LSTM/Transformer Models**: Deep learning approaches that learn complex
nonlinear temporal patterns from large datasets. Best when data is abundant
and relationships are too complex for statistical models.
- **Seasonal Decomposition**: Breaking a time series into trend, seasonal, and
residual components to understand and model each separately.
- **Ensemble Methods**: Combining forecasts from multiple models to reduce
variance and improve accuracy. Simple averages often outperform individual models.
## Best Practices
- Always visualize the data before modeling. Plot the raw series, its
autocorrelation function, and seasonal decomposition.
- Test for stationarity using the Augmented Dickey-Fuller test. Difference or
transform non-stationary series before applying models that require it.
- Use walk-forward validation (expanding or sliding window) rather than random
train-test splits. Time order matters.
- Include external regressors (holidays, promotions, weather) when they have
known causal effects on the target variable.
- Evaluate with multiple metrics: MAE for interpretability, MAPE for relative
error, RMSE for penalizing large errors, and MASE for comparing across series.
- Produce prediction intervals, not just point forecasts. Calibrate intervals
against held-out data.
- Re-train models regularly as new data arrives and patterns shift.
## Common Patterns
- **Multi-Step Forecasting**: Predicting multiple future time steps either
recursively (feeding predictions back as inputs) or directly (training separate
models for each horizon).
- **Hierarchical Forecasting**: Forecasting at multiple aggregation levels
(product, category, total) and reconciling them to ensure consistency.
- **Anomaly-Aware Forecasting**: Detecting and handling anomalies in training data
to prevent them from corrupting learned patterns, while also flagging anomalies
in incoming data.
- **Intermittent Demand**: Specialized methods like Croston's for time series with
many zero values, common in inventory and spare parts forecasting.
## Anti-Patterns
- Using complex deep learning models on small datasets where statistical models
would perform better and be more interpretable.
- Ignoring seasonality or trend and treating the series as stationary when it
clearly is not.
- Evaluating forecast accuracy only on the most recent period rather than across
multiple forecast origins.
- Overfitting to training data by using too many parameters relative to the
length of the series.
- Forecasting far beyond the horizon where the model has predictive power.
Uncertainty grows with horizon; acknowledge limits.
- Ignoring structural breaks or regime changes that invalidate patterns learned
from historical data.