Aeon API patterns for time series machine learning -- classification, regression, clustering, anomaly detection, segmentation, and similarity search. Use when /ds:experiment needs time-series-specific ML algorithms (ROCKET, InceptionTime, DTW classifiers), or /ds:eda needs temporal feature extraction (Catch22, ROCKET features) or change point detection. For classical statistical forecasting (ARIMA/SARIMAX) use statsmodels; for tabular ML pipelines use scikit-learn; for visualization use matplotlib.
Aeon is a scikit-learn compatible Python toolkit for time series machine learning. It provides state-of-the-art algorithms for classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search.
Role in the ds plugin: This skill is invoked by /ds:experiment at step 1b (Experiment Type Detection) for routing temporal supervised, temporal unsupervised, and anomaly detection experiments, at step 3 (Methodology Design) for time-series algorithm selection and distance metric choice, at step 6 (Execute) for aeon code scaffold generation, and at step 7 (Generate Results) for time-series-specific evaluation metrics. It is also referenced by /ds:eda at step 5 (Distribution Analysis) for temporal feature extraction suggestions and at step 7b for change point detection, and by /ds:plan at step 3 (Approach Selection) for time-series ML algorithm selection.
Boundary with other skills:
plt.savefig() + plt.close(fig), never plt.show()).benchmarking module for time-series-specific evaluation metrics (range-based precision/recall, clustering accuracy) and statistical comparison across datasets (Nemenyi, Wilcoxon).DS plugin conventions:
random_state (or numpy/tensorflow seeds for deep learning) for reproducibilityfit, predict, transform) for consistency with plugin pipeline patternsaeon.transformations.collection.Normalizer(n_samples, n_channels, n_timepoints) -- document this shape convention in generated code commentsmatplotlib skill's DS plugin conventionsApply this skill when:
uv pip install aeon
Categorize time series into predefined classes. See references/classification.md for complete algorithm catalog.
Quick Start:
from aeon.classification.convolution_based import RocketClassifier
from aeon.datasets import load_classification
# Load data -- shape: (n_samples, n_channels, n_timepoints)
X_train, y_train = load_classification("GunPoint", split="train")
X_test, y_test = load_classification("GunPoint", split="test")
# Train classifier
clf = RocketClassifier(n_kernels=10000, random_state=42)
clf.fit(X_train, y_train)
accuracy = clf.score(X_test, y_test)
Algorithm Selection:
MiniRocketClassifier, ArsenalHIVECOTEV2, InceptionTimeClassifierShapeletTransformClassifier, Catch22ClassifierKNeighborsTimeSeriesClassifier with DTW distancePredict continuous values from time series. See references/regression.md for algorithms.
Quick Start:
from aeon.regression.convolution_based import RocketRegressor
from aeon.datasets import load_regression
X_train, y_train = load_regression("Covid3Month", split="train")
X_test, y_test = load_regression("Covid3Month", split="test")
reg = RocketRegressor(random_state=42)
reg.fit(X_train, y_train)
predictions = reg.predict(X_test)
Group similar time series without labels. See references/clustering.md for methods.
Quick Start:
from aeon.clustering import TimeSeriesKMeans
clusterer = TimeSeriesKMeans(
n_clusters=3,
distance="dtw",
averaging_method="ba",
random_state=42
)
labels = clusterer.fit_predict(X_train)
centers = clusterer.cluster_centers_
Predict future time series values. See references/forecasting.md for forecasters.
Quick Start:
from aeon.forecasting.arima import ARIMA
forecaster = ARIMA(order=(1, 1, 1))
forecaster.fit(y_train)
y_pred = forecaster.predict(fh=[1, 2, 3, 4, 5])
Identify unusual patterns or outliers. See references/anomaly_detection.md for detectors.
Quick Start:
from aeon.anomaly_detection import STOMP
detector = STOMP(window_size=50)
anomaly_scores = detector.fit_predict(y)
# Higher scores indicate anomalies
threshold = np.percentile(anomaly_scores, 95)
anomalies = anomaly_scores > threshold
Partition time series into regions with change points. See references/segmentation.md.
Quick Start:
from aeon.segmentation import ClaSPSegmenter
segmenter = ClaSPSegmenter()
change_points = segmenter.fit_predict(y)
Find similar patterns within or across time series. See references/similarity_search.md.
Quick Start:
from aeon.similarity_search import StompMotif
# Find recurring patterns
motif_finder = StompMotif(window_size=50, k=3)
motifs = motif_finder.fit_predict(y)
Transform time series for feature engineering. See references/transformations.md.
ROCKET Features:
from aeon.transformations.collection.convolution_based import RocketTransformer
rocket = RocketTransformer(random_state=42)
X_features = rocket.fit_transform(X_train)
# Use features with any sklearn classifier
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier(random_state=42)
clf.fit(X_features, y_train)
Statistical Features:
from aeon.transformations.collection.feature_based import Catch22
catch22 = Catch22()
X_features = catch22.fit_transform(X_train)
Preprocessing:
from aeon.transformations.collection import MinMaxScaler, Normalizer
scaler = Normalizer() # Z-normalization
X_normalized = scaler.fit_transform(X_train)
Specialized temporal distance measures. See references/distances.md for complete catalog.
Usage:
from aeon.distances import dtw_distance, dtw_pairwise_distance
# Single distance
distance = dtw_distance(x, y, window=0.1)
# Pairwise distances
distance_matrix = dtw_pairwise_distance(X_train)
# Use with classifiers
from aeon.classification.distance_based import KNeighborsTimeSeriesClassifier
clf = KNeighborsTimeSeriesClassifier(
n_neighbors=5,
distance="dtw",
distance_params={"window": 0.2}
)
Available Distances:
Neural architectures for time series. See references/networks.md.
Architectures:
FCNClassifier, ResNetClassifier, InceptionTimeClassifierRecurrentNetwork, TCNNetworkAEFCNClusterer, AEResNetClustererUsage:
from aeon.classification.deep_learning import InceptionTimeClassifier
clf = InceptionTimeClassifier(n_epochs=100, batch_size=32)
clf.fit(X_train, y_train)
predictions = clf.predict(X_test)
Load standard benchmarks and evaluate performance. See references/datasets_benchmarking.md.
Load Datasets:
from aeon.datasets import load_classification, load_regression
# Classification
X_train, y_train = load_classification("ArrowHead", split="train")
# Regression
X_train, y_train = load_regression("Covid3Month", split="train")
Benchmarking:
from aeon.benchmarking import get_estimator_results
# Compare with published results
published = get_estimator_results("ROCKET", "GunPoint")
from aeon.transformations.collection import Normalizer
from aeon.classification.convolution_based import RocketClassifier
from sklearn.pipeline import Pipeline
pipeline = Pipeline([
('normalize', Normalizer()),
('classify', RocketClassifier(random_state=42))
])
pipeline.fit(X_train, y_train)
accuracy = pipeline.score(X_test, y_test)
from aeon.transformations.collection import RocketTransformer
from sklearn.ensemble import GradientBoostingClassifier
# Extract features
rocket = RocketTransformer(random_state=42)
X_train_features = rocket.fit_transform(X_train)
X_test_features = rocket.transform(X_test)
# Train traditional ML
clf = GradientBoostingClassifier(random_state=42)
clf.fit(X_train_features, y_train)
predictions = clf.predict(X_test_features)
from aeon.anomaly_detection import STOMP
import matplotlib.pyplot as plt
import numpy as np
detector = STOMP(window_size=50)
scores = detector.fit_predict(y)
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(15, 5), constrained_layout=True)
ax1.plot(y, label='Time Series')
ax1.legend()
ax2.plot(scores, label='Anomaly Scores', color='red')
ax2.axhline(np.percentile(scores, 95), color='k', linestyle='--')
ax2.legend()
plt.savefig('anomaly_detection.png', dpi=150, bbox_inches='tight')
plt.close(fig)
Normalize: Most algorithms benefit from z-normalization
from aeon.transformations.collection import Normalizer
normalizer = Normalizer()
X_train = normalizer.fit_transform(X_train)
X_test = normalizer.transform(X_test)
Handle Missing Values: Impute before analysis
from aeon.transformations.collection import SimpleImputer
imputer = SimpleImputer(strategy='mean')
X_train = imputer.fit_transform(X_train)
Check Data Format: Aeon expects shape (n_samples, n_channels, n_timepoints)
For Fast Prototyping:
MiniRocketClassifierMiniRocketRegressorTimeSeriesKMeans with EuclideanFor Maximum Accuracy:
HIVECOTEV2, InceptionTimeClassifierInceptionTimeRegressorARIMA, TCNForecasterFor Interpretability:
ShapeletTransformClassifier, Catch22ClassifierCatch22, TSFreshFor Small Datasets:
KNeighborsTimeSeriesClassifier with DTWDetailed information available in references/:
classification.md - All classification algorithmsregression.md - Regression methodsclustering.md - Clustering algorithmsforecasting.md - Forecasting approachesanomaly_detection.md - Anomaly detection methodssegmentation.md - Segmentation algorithmssimilarity_search.md - Pattern matching and motif discoverytransformations.md - Feature extraction and preprocessingdistances.md - Time series distance metricsnetworks.md - Deep learning architecturesdatasets_benchmarking.md - Data loading and evaluation toolsSearch for places (restaurants, cafes, etc.) via Google Places API proxy on localhost.
Interact with GitHub using the `gh` CLI. Use `gh issue`, `gh pr`, `gh run`, and `gh api` for issues, PRs, CI runs, and advanced queries.
Create or update AgentSkills. Use when designing, structuring, or packaging skills with scripts, references, and assets.
Start voice calls via the OpenClaw voice-call plugin.
Notion API for creating and managing pages, databases, and blocks.
Gemini CLI for one-shot Q&A, summaries, and generation.
Category:developer