File size: 2,302 Bytes
3272ebc
 
3ace4c0
 
 
 
 
3272ebc
 
8691d5d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
---
title: Test
emoji: 🦖
colorFrom: green
colorTo: blue
sdk: docker
app_port: 7860
---

# TiRex – Zero‑Shot Time Series Forecasting App

A Gradio‑based interactive web app to perform zero‑shot time series forecasting using the TiRex model. Upload your own CSV/XLSX/Parquet files or choose from built‑in presets, filter series by name, and visualize quantile forecasts over your chosen horizon.

---

## 🔍 Features

- **Zero‑Shot Forecasting**: Powered by the [`NX-AI/TiRex`](https://huggingface.co/NX-AI/TiRex) model.
- **Custom Data Upload**: Accepts CSV, XLSX, and Parquet.
- **Preset Datasets**: Includes `loop.csv`, `air_passangers.csv`, and `ett2.csv` for quick demos.
- **Interactive Filtering**: Search, check/uncheck, and plot only the series you care about.
- **Quantile Forecasts**: Displays historical data, median forecast line, and 10–90% quantile shading.
- **Configurable Horizon**: Slider to set forecast length (1–512 steps).
- **Automatic Defaults**: Detects best forecast‐length defaults for presets.

---

## 📊 Data Format

### With Named Series
```csv
AAPL,120.5,121.0,119.8,122.1,123.5,...
AMZN,3300.0,3310.5,3295.2,3305.8,3315.1,...
GOOGL,2800.1,2795.3,2810.7,2805.2,2820.4,...
```

### Without Named Series
```csv
120.5,121.0,119.8,122.1,123.5,...
3300.0,3310.5,3295.2,3305.8,3315.1,...
2800.1,2795.3,2810.7,2805.2,2820.4,...
```

### Key Rules:
- **One row per time series**
- **Consistent naming**: Either all rows have names (first column) or none do
- **Numeric data**: All values after the optional name column must be numeric
- **Minimum length**: Time series must have at least `forecast_length + 10` data points
- **Maximum constraints**: Up to 30 time series and 2048 time steps per series

## 🔧 Configuration

### Forecast Length
- **Default**: 64 steps
- **Range**: 1-512 steps
- **Auto-adjustment**: Preset datasets have optimized forecast lengths:
  - `loop.csv` and `ett2.csv`: 256 steps
  - `air_passangers.csv`: 48 steps

### Model Settings
- **Device**: CUDA (T4 GPU)
- **Quantiles**: 10%, 50% (median), 90% prediction intervals

## 📈 Output Features

- **Historical data**: Blue line showing input time series
- **Median forecast**: Orange line for point predictions
- **Uncertainty bands**: Gray shaded area showing 10%-90%