Aeon

From lifangda/claude-plugins · View interactive version

Aeon is an AI agent skill from the GitHub repository lifangda/claude-plugins. Time series machine learning toolkit for classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use this skill when working with temporal data, performing time series analysis, building predictive models on sequential data, or implementing workfl

How to use this skill

Skill file

Aeon

Overview

Aeon is a comprehensive Python toolkit for time series machine learning, providing state-of-the-art algorithms and classical techniques for analyzing temporal data. Use this skill when working with sequential/temporal data across seven primary learning tasks: classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search.

When to Use This Skill

Apply this skill when:

Core Capabilities

1. Time Series Classification

Classify labeled time series using diverse algorithm families:

Example:

from aeon.classification.convolution_based import RocketClassifier
from aeon.datasets import load_arrow_head

X_train, y_train = load_arrow_head(split="train")
X_test, y_test = load_arrow_head(split="test")

clf = RocketClassifier()
clf.fit(X_train, y_train)
accuracy = clf.score(X_test, y_test)

2. Time Series Regression

Predict continuous values from time series using adapted classification algorithms:

from aeon.regression.convolution_based import RocketRegressor

reg = RocketRegressor()
reg.fit(X_train, y_train_continuous)
predictions = reg.predict(X_test)

3. Forecasting

Predict future values using statistical and deep learning models:

Example:

from aeon.forecasting.naive import NaiveForecaster

forecaster = NaiveForecaster(strategy="last")
forecaster.fit(y_train)
y_pred = forecaster.predict(fh=[1, 2, 3])  # forecast 3 steps ahead

4. Anomaly Detection

Identify outliers in time series data:

Example:

from aeon.anomaly_detection import STOMP

detector = STOMP(window_size=50)
anomaly_scores = detector.fit_predict(X_series)

5. Clustering

Group similar time series without labels:

from aeon.clustering import TimeSeriesKMeans

clusterer = TimeSeriesKMeans(n_clusters=3, distance="dtw")
clusterer.fit(X_collection)
labels = clusterer.predict(X_new)

6. Segmentation

Divide time series into distinct regions or identify change points:

from aeon.segmentation import ClaSPSegmenter

segmenter = ClaSPSegmenter()
change_points = segmenter.fit_predict(X_series)

7. Similarity Search

Find motifs and nearest neighbors in time series collections using specialized distance metrics and matrix profile techniques.

8. Transformations

Preprocess and extract features from time series:

Example:

from aeon.transformations.collection.convolution_based import Rocket

rocket = Rocket(num_kernels=10000)
X_transformed = rocket.fit_transform(X_train)

9. Distance Metrics

Compute specialized time series distances:

Example:

from aeon.distances import dtw_distance, pairwise_distance

dist = dtw_distance(series1, series2)
dist_matrix = pairwise_distance(X_collection, metric="dtw")

Installation

Install aeon using pip:

# Core dependencies only
pip install -U aeon

# All optional dependencies
pip install -U "aeon[all_extras]"

Or using conda:

conda create -n aeon-env -c conda-forge aeon
conda activate aeon-env

Requirements: Python 3.9, 3.10, 3.11, or 3.12

Data Format

Aeon uses standardized data shapes:

Load example datasets:

from aeon.datasets import load_arrow_head, load_airline

# Classification dataset
X_train, y_train = load_arrow_head(split="train")

# Forecasting dataset
y = load_airline()

Workflow Patterns

Pipeline Construction

Combine transformers and estimators using scikit-learn pipelines:

from sklearn.pipeline import Pipeline
from aeon.transformations.collection import Catch22
from aeon.classification.distance_based import KNeighborsTimeSeriesClassifier

pipeline = Pipeline([
    ('features', Catch22()),
    ('classifier', KNeighborsTimeSeriesClassifier())
])
pipeline.fit(X_train, y_train)

Discovery and Tags

Find estimators programmatically:

from aeon.utils.discovery import all_estimators

# Find all classifiers
classifiers = all_estimators(type_filter="classifier")

# Find all forecasters
forecasters = all_estimators(type_filter="forecaster")

References

The skill includes modular reference files with comprehensive details:

references/learning_tasks.md

In-depth coverage of classification, regression, clustering, and similarity search, including algorithm categories, use cases, and code patterns.

references/temporal_analysis.md

Detailed information on forecasting, anomaly detection, and segmentation tasks with model descriptions and workflows.

references/core_modules.md

Comprehensive documentation of transformations, distances, networks, datasets, and benchmarking utilities.

references/workflows.md

Common workflow patterns, pipeline examples, cross-validation strategies, and integration with scikit-learn.

Load these reference files as needed for detailed information on specific modules or workflows.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.