Loading…
Glossary term
Predicting future values from a sequence of past measurements over time.
Time series forecasting predicts future values from a sequence of past measurements: sales next month, tomorrow's electricity demand, a stock's volatility. Models look for trend, seasonality and other patterns.
Methods range from simple averages to specialized neural networks.
A simple moving-average forecast
history = [10, 12, 13, 12, 15, 16]
window = 3
forecast = sum(history[-window:]) / window
print(forecast) # 14.33...Accurate forecasts help plan inventory, energy, staffing and finance.