基于历史数据 · 时间序列 · 因果模型
简单移动平均 (SMA) 加权移动平均 (WMA)
公式:Fₜ = (Aₜ₋₁ + Aₜ₋₂ + … + Aₜ₋ₙ) / n
| 周期 | 需求 | 3期MA |
|---|---|---|
| 1月 | 120 | - |
| 2月 | 135 | - |
| 3月 | 130 | 128.3 |
| 4月 | 145 | 136.7 |
| 5月 | 150 | 141.7 |
一次指数平滑 (SES) 适用于无趋势、无季节
公式:Fₜ = α·Aₜ₋₁ + (1-α)·Fₜ₋₁
| t | 需求 | 预测(α=0.3) |
|---|---|---|
| 1 | 120 | 120 (初始) |
| 2 | 135 | 120 |
| 3 | 130 | 124.5 |
| 4 | 145 | 126.2 |
| 5 | 150 | 131.8 |
# Python 指数平滑示例 (α=0.3)
def exponential_smoothing(series, alpha):
result = [series[0]]
for i in range(1, len(series)):
result.append(alpha * series[i-1] + (1-alpha) * result[-1])
return result
demand = [120, 135, 130, 145, 150]
forecast = exponential_smoothing(demand, 0.3)
print(forecast) # [120, 120, 124.5, 126.15, 131.8]
定性 + 定量融合,实现精准预测