AI4TS
raw JSON → 0.0.3 verified Mon Apr 27 auth: no python
AI4TS (AI for Time Series) is a Python library for time series forecasting, classification, and anomaly detection using deep learning. Current version: 0.0.3, released 2023-11. The library is in early development with frequent releases.
pip install ai4ts Common errors
error ModuleNotFoundError: No module named 'ai4ts' ↓
cause Library not installed or installed in wrong environment.
fix
Run
pip install ai4ts in your active Python environment. error ImportError: cannot import name 'TSDataset' from 'ai4ts' ↓
cause Incorrect import path; TSDataset is under ai4ts.datasets.
fix
Use
from ai4ts.datasets import TSDataset. Warnings
gotcha The library is in early alpha (v0.0.3). APIs are unstable and may change without notice. ↓
fix Pin to exact version and monitor GitHub for changes.
deprecated Some dataset loading functions use a different signature in GitHub examples vs. installed version. Check version compatibility. ↓
fix Refer to the documentation for your installed version; use `pip show ai4ts` to verify.
Imports
- TSDataset wrong
from ai4ts import TSDatasetcorrectfrom ai4ts.datasets import TSDataset - TimeSeriesForecaster wrong
from ai4ts import TimeSeriesForecastercorrectfrom ai4ts.models import TimeSeriesForecaster
Quickstart
from ai4ts.datasets import TSDataset
from ai4ts.models import TimeSeriesForecaster
import torch
dataset = TSDataset()
X, y = dataset.load_data('airline')
model = TimeSeriesForecaster(input_size=1, hidden_size=64, num_layers=2)
model.train(X, y, epochs=10)