Metadata-Version: 2.4
Name: autotsforecast
Version: 0.2.0
Summary: Automated multivariate time series forecasting with model selection, backtesting, hierarchical reconciliation, and interpretability.
Author-email: Weibin Xu <weibinxu86@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/weibinxu86/autotsforecast
Project-URL: Repository, https://github.com/weibinxu86/autotsforecast
Project-URL: Documentation, https://github.com/weibinxu86/autotsforecast#readme
Keywords: time series,forecasting,multivariate,automated,hierarchical,interpretability,shap
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Science/Research
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21.0
Requires-Dist: pandas>=1.3.0
Requires-Dist: scikit-learn>=1.0.0
Requires-Dist: statsmodels>=0.13.0
Requires-Dist: scipy>=1.7.0
Requires-Dist: joblib>=1.1.0
Provides-Extra: viz
Requires-Dist: matplotlib>=3.4.0; extra == "viz"
Requires-Dist: seaborn>=0.11.0; extra == "viz"
Provides-Extra: interpret
Requires-Dist: shap>=0.42.0; extra == "interpret"
Provides-Extra: ml
Requires-Dist: xgboost>=2.0.0; extra == "ml"
Provides-Extra: prophet
Requires-Dist: prophet>=1.1.0; extra == "prophet"
Provides-Extra: neural
Requires-Dist: darts>=0.27.0; extra == "neural"
Requires-Dist: torch>=2.0.0; extra == "neural"
Requires-Dist: lightning>=2.0.0; extra == "neural"
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=3.0.0; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: flake8>=4.0.0; extra == "dev"
Requires-Dist: mypy>=0.950; extra == "dev"
Requires-Dist: ipython>=8.0.0; extra == "dev"
Requires-Dist: jupyter>=1.0.0; extra == "dev"
Requires-Dist: nbformat>=5.0.0; extra == "dev"
Provides-Extra: all
Requires-Dist: matplotlib>=3.4.0; extra == "all"
Requires-Dist: seaborn>=0.11.0; extra == "all"
Requires-Dist: shap>=0.42.0; extra == "all"
Requires-Dist: xgboost>=2.0.0; extra == "all"
Requires-Dist: prophet>=1.1.0; extra == "all"
Requires-Dist: darts>=0.27.0; extra == "all"
Requires-Dist: torch>=2.0.0; extra == "all"
Requires-Dist: lightning>=2.0.0; extra == "all"
Dynamic: license-file

# AutoTSForecast

**Automated Time Series Forecasting with Per-Series Model Selection**

[![Python 3.8+](https://img.shields.io/badge/python-3.8+-blue.svg)](https://www.python.org/downloads/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

AutoTSForecast automatically finds the best forecasting model for each of your time series. No more guessing whether Prophet, ARIMA, or XGBoost works best — let the algorithm decide.

## Installation

```bash
pip install "autotsforecast[all]"
```

## Key Features

### 🤖 AutoForecaster — Automatic Per-Series Model Selection
Evaluates multiple models via cross-validation and automatically selects the best one for each time series.

```python
from autotsforecast import AutoForecaster

auto = AutoForecaster(candidate_models=[...], metric='rmse')
auto.fit(y_train)
forecasts = auto.forecast()
```

### 📊 Hierarchical Reconciliation
Ensure forecasts are coherent across aggregation levels (e.g., regions sum to total).

```python
from autotsforecast.hierarchical.reconciliation import HierarchicalReconciler

reconciler = HierarchicalReconciler(forecasts=base_forecasts, hierarchy={'total': ['region_a', 'region_b']})
reconciler.reconcile(method='ols')
```

### ✅ Backtesting & Cross-Validation
Robust time series cross-validation to evaluate model performance.

```python
from autotsforecast.backtesting.validator import BacktestValidator

validator = BacktestValidator(model=my_model, n_splits=5, test_size=14)
validator.run(y_train)
```

### 🔍 Interpretability
Understand which features drive your forecasts using sensitivity analysis and SHAP values.

```python
from autotsforecast.interpretability.drivers import DriverAnalyzer

analyzer = DriverAnalyzer(model=fitted_model, feature_names=['temperature', 'promotion'])
importance = analyzer.calculate_feature_importance(X_test, y_test)
```

## Available Models

**Core Models** (included): ARIMA, ETS, Linear, MovingAverage, RandomForest, VAR

**Optional Models**: XGBoost, Prophet, LSTM (install with extras: `[ml]`, `[prophet]`, `[neural]`)

**Covariate Support**: Prophet, ARIMA, XGBoost, RandomForest, LSTM

## Documentation

**Full documentation, tutorials, and examples:**  
[https://github.com/weibinxu86/autotsforecast](https://github.com/weibinxu86/autotsforecast)

## License

MIT License
