aeon by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill aeonAeon 是一个与 scikit-learn 兼容的 Python 工具包,用于时间序列机器学习。它提供了用于分类、回归、聚类、预测、异常检测、分割和相似性搜索的最先进算法。
在以下情况下应用此技能:
uv pip install aeon
将时间序列分类到预定义的类别中。完整算法目录请参见 references/classification.md。
快速开始:
from aeon.classification.convolution_based import RocketClassifier
from aeon.datasets import load_classification
# 加载数据
X_train, y_train = load_classification("GunPoint", split="train")
X_test, y_test = load_classification("GunPoint", split="test")
# 训练分类器
clf = RocketClassifier(n_kernels=10000)
clf.fit(X_train, y_train)
accuracy = clf.score(X_test, y_test)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
算法选择:
MiniRocketClassifier, ArsenalHIVECOTEV2, InceptionTimeClassifierShapeletTransformClassifier, Catch22ClassifierKNeighborsTimeSeriesClassifier根据时间序列预测连续值。算法请参见 references/regression.md。
快速开始:
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()
reg.fit(X_train, y_train)
predictions = reg.predict(X_test)
对没有标签的相似时间序列进行分组。方法请参见 references/clustering.md。
快速开始:
from aeon.clustering import TimeSeriesKMeans
clusterer = TimeSeriesKMeans(
n_clusters=3,
distance="dtw",
averaging_method="ba"
)
labels = clusterer.fit_predict(X_train)
centers = clusterer.cluster_centers_
预测未来的时间序列值。预测器请参见 references/forecasting.md。
快速开始:
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])
识别异常模式或离群值。检测器请参见 references/anomaly_detection.md。
快速开始:
from aeon.anomaly_detection import STOMP
detector = STOMP(window_size=50)
anomaly_scores = detector.fit_predict(y)
# 分数越高表示异常
threshold = np.percentile(anomaly_scores, 95)
anomalies = anomaly_scores > threshold
将时间序列划分为具有变化点的区域。请参见 references/segmentation.md。
快速开始:
from aeon.segmentation import ClaSPSegmenter
segmenter = ClaSPSegmenter()
change_points = segmenter.fit_predict(y)
在时间序列内或跨时间序列查找相似模式。请参见 references/similarity_search.md。
快速开始:
from aeon.similarity_search import StompMotif
# 查找重复模式
motif_finder = StompMotif(window_size=50, k=3)
motifs = motif_finder.fit_predict(y)
为特征工程转换时间序列。请参见 references/transformations.md。
ROCKET 特征:
from aeon.transformations.collection.convolution_based import RocketTransformer
rocket = RocketTransformer()
X_features = rocket.fit_transform(X_train)
# 将特征与任何 sklearn 分类器一起使用
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier()
clf.fit(X_features, y_train)
统计特征:
from aeon.transformations.collection.feature_based import Catch22
catch22 = Catch22()
X_features = catch22.fit_transform(X_train)
预处理:
from aeon.transformations.collection import MinMaxScaler, Normalizer
scaler = Normalizer() # Z-归一化
X_normalized = scaler.fit_transform(X_train)
专门的时间距离度量。完整目录请参见 references/distances.md。
用法:
from aeon.distances import dtw_distance, dtw_pairwise_distance
# 单一距离
distance = dtw_distance(x, y, window=0.1)
# 成对距离
distance_matrix = dtw_pairwise_distance(X_train)
# 与分类器一起使用
from aeon.classification.distance_based import KNeighborsTimeSeriesClassifier
clf = KNeighborsTimeSeriesClassifier(
n_neighbors=5,
distance="dtw",
distance_params={"window": 0.2}
)
可用距离:
用于时间序列的神经架构。请参见 references/networks.md。
架构:
FCNClassifier, ResNetClassifier, InceptionTimeClassifierRecurrentNetwork, TCNNetworkAEFCNClusterer, AEResNetClusterer用法:
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)
加载标准基准并评估性能。请参见 references/datasets_benchmarking.md。
加载数据集:
from aeon.datasets import load_classification, load_regression
# 分类
X_train, y_train = load_classification("ArrowHead", split="train")
# 回归
X_train, y_train = load_regression("Covid3Month", split="train")
基准测试:
from aeon.benchmarking import get_estimator_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())
])
pipeline.fit(X_train, y_train)
accuracy = pipeline.score(X_test, y_test)
from aeon.transformations.collection import RocketTransformer
from sklearn.ensemble import GradientBoostingClassifier
# 提取特征
rocket = RocketTransformer()
X_train_features = rocket.fit_transform(X_train)
X_test_features = rocket.transform(X_test)
# 训练传统机器学习模型
clf = GradientBoostingClassifier()
clf.fit(X_train_features, y_train)
predictions = clf.predict(X_test_features)
from aeon.anomaly_detection import STOMP
import matplotlib.pyplot as plt
detector = STOMP(window_size=50)
scores = detector.fit_predict(y)
plt.figure(figsize=(15, 5))
plt.subplot(2, 1, 1)
plt.plot(y, label='时间序列')
plt.subplot(2, 1, 2)
plt.plot(scores, label='异常分数', color='red')
plt.axhline(np.percentile(scores, 95), color='k', linestyle='--')
plt.show()
归一化 : 大多数算法受益于 z-归一化
from aeon.transformations.collection import Normalizer
normalizer = Normalizer()
X_train = normalizer.fit_transform(X_train)
X_test = normalizer.transform(X_test)
处理缺失值 : 在分析前进行插补
from aeon.transformations.collection import SimpleImputer
imputer = SimpleImputer(strategy='mean')
X_train = imputer.fit_transform(X_train)
检查数据格式 : Aeon 期望形状为 (n_samples, n_channels, n_timepoints)
用于快速原型设计:
MiniRocketClassifierMiniRocketRegressorTimeSeriesKMeans用于最高准确率:
HIVECOTEV2, InceptionTimeClassifierInceptionTimeRegressorARIMA, TCNForecaster用于可解释性:
ShapeletTransformClassifier, Catch22ClassifierCatch22, TSFresh用于小数据集:
KNeighborsTimeSeriesClassifier详细信息请参见 references/ 目录:
classification.md - 所有分类算法regression.md - 回归方法clustering.md - 聚类算法forecasting.md - 预测方法anomaly_detection.md - 异常检测方法segmentation.md - 分割算法similarity_search.md - 模式匹配和 motif 发现transformations.md - 特征提取和预处理distances.md - 时间序列距离度量networks.md - 深度学习架构datasets_benchmarking.md - 数据加载和评估工具每周安装量
166
代码仓库
GitHub 星标数
23.5K
首次出现
2026年1月21日
安全审计
安装于
claude-code139
opencode135
gemini-cli124
cursor124
antigravity113
codex112
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.
Apply 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
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)
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()
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"
)
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()
X_features = rocket.fit_transform(X_train)
# Use features with any sklearn classifier
from sklearn.ensemble import RandomForestClassifier
clf = RandomForestClassifier()
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())
])
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()
X_train_features = rocket.fit_transform(X_train)
X_test_features = rocket.transform(X_test)
# Train traditional ML
clf = GradientBoostingClassifier()
clf.fit(X_train_features, y_train)
predictions = clf.predict(X_test_features)
from aeon.anomaly_detection import STOMP
import matplotlib.pyplot as plt
detector = STOMP(window_size=50)
scores = detector.fit_predict(y)
plt.figure(figsize=(15, 5))
plt.subplot(2, 1, 1)
plt.plot(y, label='Time Series')
plt.subplot(2, 1, 2)
plt.plot(scores, label='Anomaly Scores', color='red')
plt.axhline(np.percentile(scores, 95), color='k', linestyle='--')
plt.show()
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 metricsWeekly Installs
166
Repository
GitHub Stars
23.5K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
claude-code139
opencode135
gemini-cli124
cursor124
antigravity113
codex112
专业SEO审计工具:全面网站诊断、技术SEO优化与页面分析指南
63,800 周安装
scikit-bio:Python生物信息学分析库,处理序列、比对、系统发育与多样性分析
163 周安装
Loom视频转录获取器 - 自动提取Loom视频字幕与文本,支持GraphQL API
163 周安装
bioRxiv数据库Python工具:高效搜索下载预印本,支持关键词/作者/日期/类别筛选
163 周安装
Magento 2 Hyvä CMS 组件创建器 - 快速构建自定义CMS组件
163 周安装
项目文档协调器 - 自动化文档生成与上下文管理工具
163 周安装
GPUI 布局与样式:Rust 类型安全的 CSS 样式库,Flexbox 布局与链式 API
163 周安装
networks.md - Deep learning architecturesdatasets_benchmarking.md - Data loading and evaluation tools