Visualizing Simple Exponential Smoothing
Lấy cảm hứng từ video này?
Exponential Smoothing Visualization
Overview
This animation demonstrates the simple exponential smoothing operation used in time‑series forecasting. Viewers see how a smoothing factor (now expressed as the weight 0.1 on the current observation and 0.9 on the previous smoothed value) blends the current observation with the previous smoothed value, producing a smooth forecast line that reacts to new data. A numeric table is built step‑by‑step to illustrate the recursive computation
(the formula is shown at the top of the scene as ). The table now uses observations that start at 90 and increase to 96 (the series stops at ). For each newly computed a short arithmetic line appears directly below the table, showing the explicit calculation in the form
At the end of the sequence the forecast for is calculated and displayed. The table has been widened slightly to give each column a little more breathing room.
Phases
| # | Phase Name | Duration | Description |
|---|---|---|---|
| 1 | Intro | ~4 s | Title “Exponential Smoothing” fades in, then a brief appearance of a raw time‑series (blue dots) across the main area. |
| 2 | Formula Reveal | ~5 s | The smoothing equation appears at the top of the scene while the raw series remains visible. |
| 3 | Table Construction & Initial Calculations | ~9 s | A two‑row table is drawn beneath the graph (now a bit wider). The top row is labeled and is filled with the values 90, 91, … , 96 (increment +1). To the left of this row the coefficient (weight on ) is shown. Before the first cell lights up, the first smoothed cell appears, displaying the explicit calculation . Directly under the table, a short “calculation line” writes the expression together with the numeric substitution for each step. The bottom row is labeled and is then filled iteratively using the recurrence; to the left of this row the coefficient (weight on ) is shown. The initial value is . Each subsequent column lights up as the new value is computed, with the corresponding column lighting up immediately after its paired . |
| 4 | Step‑by‑Step Walkthrough (Graph) | ~10 s | Starting from the first point, the animation iteratively computes for each time step, drawing the smoothed line (red) point‑by‑point on the graph. A small arrow or highlight indicates the current observation being incorporated, synchronized with the column that just lit up in the table. |
| 5 | Effect of Weight Change | ~6 s | The weight on the observation is changed from the low value 0.1 to a higher value 0.8. The smoothed line updates in real time, illustrating how a larger weight on the current observation follows the data more closely. |
| 6 | Forecast Calculation | ~4 s | After the last table column (for ) lights up, a final calculation line appears under the table showing with the numeric result. The corresponding point is added to the red smoothed line, and a brief label “Forecast ” pops up next to it. |
| 7 | Closing Summary | ~3 s | The final smoothed curve stays on screen while the caption shows a concise takeaway: “Higher weight on → less smoothing, quicker response; lower weight on → more smoothing, slower response.” |
Layout
┌───────────────────────────────────────────────────────┐
│ F_{t+1}= 0.1 × y_t + 0.9 × F_t (top caption) │
├───────────────────────────────────────────────────────┤
│ MAIN (graph) │
│ • Raw data points (blue) │
│ • Smoothed line (red) │
├───────────────────────────────────────────────────────┤
│ Table (wider): 0.1 y_t: 90 91 … 96 │
│ 0.9 F_t: 100 … (computed values) │
│ └─ Calculation line under table showing each │
│ step as “F_t × 0.9 + 0.1 × y_t = …” │
│ └─ Final line for F_8 appears after the last step │
├───────────────────────────────────────────────────────┤
│ Caption / label (phase‑specific text) │
└───────────────────────────────────────────────────────┘
Area Descriptions
| Area | Content | Notes |
|---|---|---|
| Top Caption | The smoothing formula displayed prominently at the top of the scene. | Remains visible throughout the animation. |
| Main | Cartesian plot of time (x‑axis) vs value (y‑axis). Raw observations as blue dots; smoothed values drawn as a red line that grows during Phase 4, updates in Phase 5, and receives the final forecast point in Phase 6. | Primary visual focus. Axes labeled but no large text titles. |
| Table | Two‑row table placed directly below the graph, now wider to give each column extra space. Top row labelled with values 90, 91, … , 96 and coefficient to its left. Bottom row labelled with initial and subsequent values, coefficient to its left. The first smoothed cell appears before the cell, showing the explicit computation . A calculation line under the table writes with numeric substitution for each step, ending with a final line for . | Highlights the numeric recursion, makes intermediate calculations visible, and now includes the forecast for . |
| Caption | Phase‑specific text: title, formula (already in top caption), or summary. Appears at bottom band; fades in/out with each phase. | No persistent on‑screen narration beyond this band. |
Notes
- Assumptions: No specific dataset was provided, so a generic sinusoidal‑plus‑noise series of 12 points is used for illustration on the graph, while the table now uses the deterministic increasing sequence .
- The smoothing weights are fixed at 0.1 (for ) and 0.9 (for ) for the table construction phase; later phases demonstrate the effect of changing the weight on to 0.8.
- All transitions are smooth fades or linear draws; the overall pacing is slightly slower than the original to give viewers more time to follow the calculations.
- The table width has been increased modestly to avoid crowding of cells, especially important for the final forecast line.
- No persistent on‑screen narration text beyond the caption band.
- The entire animation fits within a single Manim
Sceneclass.
Tạo bởi
Mô tả
The animation introduces exponential smoothing for time series forecasting. It shows raw data points, reveals the smoothing formula, then computes the smoothed values step by step, drawing a red forecast line. Finally it varies the smoothing factor from low to high, illustrating how a larger factor follows the data more closely while a smaller factor produces smoother, slower‑responding forecasts.
Ngày tạo
Nov 7, 2026, 02:19 PM
Độ dài
0:53