File size: 3,227 Bytes
58f46e4
 
 
03bba23
 
 
58f46e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
03bba23
 
 
58f46e4
 
 
 
03bba23
 
58f46e4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
03bba23
58f46e4
03bba23
58f46e4
 
 
 
03bba23
 
 
 
 
58f46e4
03bba23
58f46e4
03bba23
 
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
---
language:
- en
license: other
license_name: bsl-1.1
license_link: LICENSE
tags:
- time-series
- time-series-forecasting
- forecasting
- gift-eval
- meta-learning
- agentic
- pytorch
datasets:
- Salesforce/GiftEval
pipeline_tag: time-series-forecasting
---

# CompactTS-Agent: Autonomous Agentic Meta-Forecaster for Time Series

Developed by **Daksh Bhalala**.

`CompactTS-Agent` is an autonomous agentic meta-forecasting system designed for general time-series forecasting across diverse industrial domains (energy grids, server telemetry, traffic flow, nature observations, and healthcare).

## Architecture Overview

Rather than relying on a single static neural network across disparate domains, `CompactTS-Agent` operates as an autonomous orchestration system:

1. **Scale-Invariant Series Profiler:** Extracts structural statistical and spectral signatures from incoming series (Fourier spectral entropy $H_s$, normalized mean drift $\Delta_\mu$, and ARCH volatility clustering $R^2_{\text{ARCH}}$).
2. **Meta-Routing Policy:** Deterministically maps time-series physical regimes to specialized foundation model representations (e.g., concentrated harmonics, low-drift telemetry, volatility clustering).
3. **Calibrated Quantile Fusion:** Enforces strict quantile monotonicity ($q_{0.1} \le q_{0.2} \le \dots \le q_{0.9}$) and physical support projections.

## Installation & Quickstart

```bash
git clone https://github.com/DakshBhalala/CompactTS-Agent.git
cd CompactTS-Agent
pip install -e .
```

### Python API Usage

```python
import numpy as np
import pandas as pd
from compactts.agent import CompactTSAgent, SeriesProfiler

# 1. Profile an incoming time series
profiler = SeriesProfiler(freq="H")
series = np.sin(np.linspace(0, 20, 100)) + 0.1 * np.random.randn(100)
profile = profiler.profile(series)
print("Series Profile:", profile)

# 2. Generate calibrated probabilistic forecasts
agent = CompactTSAgent(prediction_length=24, freq="H")
start_dates = [pd.Period("2024-01-01 00:00", freq="h")]
forecasts = agent.forecast_batch([series], start_dates)

# Access forecast quantiles (9 levels: 0.1 to 0.9)
q_forecasts = forecasts[0].forecast_array
print("Forecast shape (9 quantiles, 24 horizon):", q_forecasts.shape)
```

## Benchmark Evaluation

CompactTS-Agent evaluation results are submitted under `model_type: "agentic"`.

To reproduce results on official benchmark configurations:
```bash
python scripts/run_agentic_benchmark.py
```

## Commercial Licensing & Enterprise Deployment

CompactTS-Agent is licensed under the **Business Source License 1.1 (BSL 1.1)**:
- **Free for Non-Commercial Research & Benchmark Replication:** Anyone is free to inspect, run, evaluate, test, and reproduce benchmarks using CompactTS-Agent.
- **Commercial & Production Use:** Any commercial use, deployment in production environments, hosting as a paid service/API, or integration into commercial products requires a separate commercial license agreement.

For commercial inquiries, enterprise deployment rights, or proprietary licensing:
- **Author:** Daksh Bhalala
- **Code Repository:** [DakshBhalala/CompactTS-Agent](https://github.com/DakshBhalala/CompactTS-Agent)
- **License:** Business Source License 1.1 (BSL-1.1)