Model checkpoints only
Browse files
README.md
DELETED
|
@@ -1,77 +0,0 @@
|
|
| 1 |
-
---
|
| 2 |
-
license: mit
|
| 3 |
-
library_name: pytorch
|
| 4 |
-
tags:
|
| 5 |
-
- time-series
|
| 6 |
-
- forecasting
|
| 7 |
-
- lstm
|
| 8 |
-
- multi-task
|
| 9 |
-
- finance
|
| 10 |
-
- weather
|
| 11 |
-
- multi-domain
|
| 12 |
-
language:
|
| 13 |
-
- en
|
| 14 |
-
metrics:
|
| 15 |
-
- mae
|
| 16 |
-
- mape
|
| 17 |
-
pipeline_tag: time-series-forecasting
|
| 18 |
-
---
|
| 19 |
-
|
| 20 |
-
# Future Prediction Models (Multi-Domain LSTM)
|
| 21 |
-
|
| 22 |
-
An end-to-end multi-domain forecasting system across **7 topics** (AI, Programming, Finance, Sports, Weather, Economy, Energy). Two model modes ship in this repo:
|
| 23 |
-
|
| 24 |
-
## 🧠 Unified model — one checkpoint for everything
|
| 25 |
-
|
| 26 |
-
`unified_model.pt` is a **single multi-task model** trained jointly on 31,735 sliding windows from all 7 domains: shared 2-layer LSTM backbone (128 hidden) + per-domain embedding + per-domain heads.
|
| 27 |
-
|
| 28 |
-
| Topic | H1 MAPE (unified) | H1 MAPE (separate) |
|
| 29 |
-
|---|---|---|
|
| 30 |
-
| AI (NVDA) | 2.36% | 1.86% |
|
| 31 |
-
| Economy (S&P 500) | 0.75% | 0.64% |
|
| 32 |
-
| Energy (WTI) | 1.90% | 2.83% |
|
| 33 |
-
| Finance (Bitcoin) | 1.74% | 1.52% |
|
| 34 |
-
| Programming (react) | 5.42% | 7.12% |
|
| 35 |
-
| Sports (ATP #1 Elo) | 0.04% | 0.06% |
|
| 36 |
-
| Weather (Chennai) | 0.18% | 0.18% |
|
| 37 |
-
|
| 38 |
-
## Quick start
|
| 39 |
-
|
| 40 |
-
```bash
|
| 41 |
-
pip install -r requirements.txt
|
| 42 |
-
python data.py --topic finance --refresh # fetch real data
|
| 43 |
-
python train_unified.py # train the single combined model
|
| 44 |
-
python ask.py "what will bitcoin do next week?"
|
| 45 |
-
python predict.py --topic finance --mode unified
|
| 46 |
-
python ask.py "compare all topics"
|
| 47 |
-
```
|
| 48 |
-
|
| 49 |
-
## Files
|
| 50 |
-
|
| 51 |
-
- `unified_model.pt` / `unified_config.json` — the single combined model + per-domain metrics
|
| 52 |
-
- `model_<topic>.pt` / `config_<topic>.json` — 7 dedicated per-topic LSTMs (alternative mode)
|
| 53 |
-
- `data/*.csv` — the real datasets used for training (BTC, NVDA, S&P 500, WTI, npm downloads, ATP tennis, Chennai weather)
|
| 54 |
-
- Full source: data pipeline (`data.py`), training (`train.py`, `train_unified.py`), inference (`predict.py`), and the ChatGPT-style chat layer (`ask.py`, `response.py`, `response_formatter.py`, `prediction_engine.py`)
|
| 55 |
-
|
| 56 |
-
## Architecture
|
| 57 |
-
|
| 58 |
-
```
|
| 59 |
-
user question -> intent detection (response.py)
|
| 60 |
-
-> prediction_engine.py (structured metrics, prints nothing)
|
| 61 |
-
-> response_formatter.py (natural summary + Markdown)
|
| 62 |
-
-> ask.py (chat CLI, stdout)
|
| 63 |
-
```
|
| 64 |
-
|
| 65 |
-
Metrics are kept strictly separate: `net_change_pct` (path change), `forecast_range_pct` (path min-max range), `current_to_forecast_pct` (vs latest observed value), `direction` (configurable threshold). No confidence is fabricated; markets are near random-walk, and 100% accuracy is impossible.
|
| 66 |
-
|
| 67 |
-
## Weather for any city
|
| 68 |
-
|
| 69 |
-
```bash
|
| 70 |
-
export WEATHER_NAME='Chennai, India' WEATHER_LAT=13.0827 WEATHER_LON=80.2707
|
| 71 |
-
python data.py --topic weather --refresh
|
| 72 |
-
python train.py --topic weather
|
| 73 |
-
```
|
| 74 |
-
|
| 75 |
-
## License
|
| 76 |
-
|
| 77 |
-
MIT
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|