feat(example): add working TimesFM forecast example with global temperature data

- Add NOAA GISTEMP global temperature anomaly dataset (36 months, 2022-2024)
- Run TimesFM 1.0 PyTorch forecast for 2025 (12-month horizon)
- Generate fan chart visualization with 80%/90% confidence intervals
- Create comprehensive markdown report with findings and API notes

API Discovery:
- TimesFM 2.5 PyTorch checkpoint has file format issue (model.safetensors
  vs expected torch_model.ckpt)
- Working API uses TimesFmHparams + TimesFmCheckpoint + TimesFm() constructor
- Documented API in GitHub README differs from actual pip package

Includes:
- temperature_anomaly.csv (input data)
- forecast_output.csv (point forecast + quantiles)
- forecast_output.json (machine-readable output)
- forecast_visualization.png (LFS-tracked)
- run_forecast.py (reusable script)
- visualize_forecast.py (chart generation)
- run_example.sh (one-click runner)
- README.md (full report with findings)
This commit is contained in:
Clayton Young
2026-02-21 15:25:52 -05:00
parent 98670bcf47
commit c7c5bc21ff
9 changed files with 787 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
date,anomaly_c
2022-01-01,0.89
2022-02-01,0.89
2022-03-01,1.02
2022-04-01,0.88
2022-05-01,0.85
2022-06-01,0.88
2022-07-01,0.88
2022-08-01,0.90
2022-09-01,0.88
2022-10-01,0.95
2022-11-01,0.77
2022-12-01,0.78
2023-01-01,0.87
2023-02-01,0.98
2023-03-01,1.21
2023-04-01,1.00
2023-05-01,0.94
2023-06-01,1.08
2023-07-01,1.18
2023-08-01,1.24
2023-09-01,1.47
2023-10-01,1.32
2023-11-01,1.18
2023-12-01,1.16
2024-01-01,1.22
2024-02-01,1.35
2024-03-01,1.34
2024-04-01,1.26
2024-05-01,1.15
2024-06-01,1.20
2024-07-01,1.24
2024-08-01,1.30
2024-09-01,1.28
2024-10-01,1.27
2024-11-01,1.22
2024-12-01,1.20
1 date anomaly_c
2 2022-01-01 0.89
3 2022-02-01 0.89
4 2022-03-01 1.02
5 2022-04-01 0.88
6 2022-05-01 0.85
7 2022-06-01 0.88
8 2022-07-01 0.88
9 2022-08-01 0.90
10 2022-09-01 0.88
11 2022-10-01 0.95
12 2022-11-01 0.77
13 2022-12-01 0.78
14 2023-01-01 0.87
15 2023-02-01 0.98
16 2023-03-01 1.21
17 2023-04-01 1.00
18 2023-05-01 0.94
19 2023-06-01 1.08
20 2023-07-01 1.18
21 2023-08-01 1.24
22 2023-09-01 1.47
23 2023-10-01 1.32
24 2023-11-01 1.18
25 2023-12-01 1.16
26 2024-01-01 1.22
27 2024-02-01 1.35
28 2024-03-01 1.34
29 2024-04-01 1.26
30 2024-05-01 1.15
31 2024-06-01 1.20
32 2024-07-01 1.24
33 2024-08-01 1.30
34 2024-09-01 1.28
35 2024-10-01 1.27
36 2024-11-01 1.22
37 2024-12-01 1.20