Skip to content

LeoYeAI/agent-master-skills / skills/aeon

This skill should be used for time series machine learning tasks including classification, regression, clustering, forecasting, anomaly detection, segmentation, and similarity search. Use when working with temporal data, sequential patterns, or time-indexed observations requiring specialized algorithms beyond standard ML approaches. Particularly suited for univariate and multivariate time series analysis with scikit-learn compatible APIs.

references/transformations.md

View on GitHub
# Transformations

Aeon provides extensive transformation capabilities for preprocessing, feature extraction, and representation learning from time series data.

## Transformation Types

Aeon distinguishes between:
- **CollectionTransformers**: Transform multiple time series (collections)
- **SeriesTransformers**: Transform individual time series

## Collection Transformers

### Convolution-Based Feature Extraction

Fast, scalable feature generation using random kernels:

- `Rocket` - Random convolutional kernels
- `MiniRocket` - Simplified ROCKET for speed
- `MultiRocket` - Enhanced ROCKET variant
- `HydraTransformer` - Multi-resolution dilated convolutions
- `ROCKETGPU` - GPU-accelerated variant

**Use when**: Need fast, scalable features for any ML algorithm, strong baseline performance.

### Statistical Feature Extraction

Domain-agnostic features based on time series characteristics:

- `Catch22` - 22 canonical time-series characteristics
- `TSFresh` - Comprehensive automated feature extraction (100+ features)
- `TSFreshRelevant` - Feature extraction with relevance filtering
- `SevenNumberSummary` - Descriptive statistics (mean, std, quantiles)

**Use when**: Need interpretable features, domain-agnostic approach, or feeding traditional ML.

### Dictionary-Based Representations

Symbolic approximations for discrete representations:

- `SAX` - Symbolic Aggregate approXimation
- `PAA` - Piecewise Aggregate Approximation
- `SFA` - Symbolic Fourier Approximation
- `SFAFast` - Optimized SFA
- `SFAWhole` - SFA on entire series (no windowing)
- `BORF` - Bag-of-Receptive-Fields

**Use when**: Need discrete/symbolic representation, dimensionality reduction, interpretability.

### Shapelet-Based Features

Discriminative subsequence extraction:

- `RandomShapeletTransform` - Random discriminative shapelets
- `RandomDilatedShapeletTransform` - Dilated shapelets for multi-scale
- `SAST` - Scalable And Accurate Subsequence Transform
- `RSAST` - Randomized SAST

**Use when**: Need interpretable discriminative patterns, phase-invariant features.

### Interval-Based Features

Statistical summaries from time intervals:

- `RandomIntervals` - Features from random intervals
- `SupervisedIntervals` - Supervised interval selection
- `QUANTTransformer` - Quantile-based interval features

**Use when**: Predictive patterns localized to specific windows.

### Preprocessing Transformations

Data preparation and normalization:

- `MinMaxScaler` - Scale to [0, 1] range
- `Normalizer` - Z-normalization (zero mean, unit variance)
- `Centerer` - Center to zero mean
- `SimpleImputer` - Fill missing values
- `DownsampleTransformer` - Reduce temporal resolution
- `Tabularizer` - Convert time series to tabular format

**Use when**: Need standardization, missing value handling, format conversion.

### Specialized Transformations

Advanced analysis methods:

- `MatrixProfileTransformer` (series module) - Nearest-neighbor distance per subsequence; requires stumpy
- `DWTTransformer` - Discrete Wavelet Transform
- `AutocorrelationFunctionTransformer` - ACF computation
- `Dobin` (series module) - Distance-based Outlier BasIs using Neighbors
- `SignatureTransformer` - Path signature methods; aeon 1.6 uses RoughPy instead of esig
- `PLASeriesTransformer` (series module) - Piecewise Linear Approximation

`Normalizer` and `MinMaxScaler` scale each case/channel along time; they do not learn population-wide feature statistics. `Catch22` uses native features by default; `use_pycatch22` is deprecated in 1.6.

### Class Imbalance Handling

- `ADASYN` - Adaptive Synthetic Sampling
- `SMOTE` - Synthetic Minority Over-sampling
- `OHIT` - Over-sampling with Highly Imbalanced Time series

**Use when**: Classification with imbalanced classes. Apply samplers only inside training folds; sampler `fit_transform(X, y)` returns resampled `(X, y)`, so do not treat it as a feature-only transformer.

### Pipeline Composition

- `CollectionTransformerPipeline` - Chain multiple transformers

## Series Transformers

Transform individual time series (e.g., for preprocessing in forecasting).

### Statistical Analysis

- `AutoCorrelationSeriesTransformer` - Autocorrelation
- `StatsModelsACF` / `StatsModelsPACF` are deprecated in 1.6; prefer `AutoCorrelationSeriesTransformer` for ACF and a supported statsmodels PACF workflow when needed

### Smoothing and Filtering

Import smoothing classes from `aeon.transformations.series.smoothing`; `BKFilter` remains in `aeon.transformations.series`.

- `ExponentialSmoothing` - Exponentially weighted moving average
- `MovingAverage` - Simple sliding-window average
- `SavitzkyGolayFilter` - Polynomial smoothing
- `GaussianFilter` - Gaussian kernel smoothing
- `BKFilter` - Baxter-King bandpass filter
- `DiscreteFourierApproximation` - Fourier-based filtering

**Use when**: Need noise reduction, trend extraction, or frequency filtering.

### Dimensionality Reduction

- `PCASeriesTransformer` - Principal component analysis
- `PLASeriesTransformer` - Piecewise Linear Approximation

### Transformations

- `BoxCoxTransformer` - Variance stabilization
- `LogTransformer` - Logarithmic scaling
- `ClaSPTransformer` - Classification Score Profile

### Pipeline Composition

- `SeriesTransformerPipeline` (from `aeon.transformations.series.compose`) - Chain series transformers

## Quick Start: Feature Extraction

```python
from aeon.transformations.collection.convolution_based import Rocket
from aeon.classification.sklearn import RotationForestClassifier
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")

# Extract ROCKET features
rocket = Rocket()
X_train_features = rocket.fit_transform(X_train)
X_test_features = rocket.transform(X_test)

# Use with any sklearn classifier
clf = RotationForestClassifier()
clf.fit(X_train_features, y_train)
accuracy = clf.score(X_test_features, y_test)
```

## Quick Start: Preprocessing Pipeline

```python
from aeon.transformations.collection import (
    MinMaxScaler,
    SimpleImputer
)
from aeon.transformations.collection.compose import CollectionTransformerPipeline

# Build preprocessing pipeline
pipeline = CollectionTransformerPipeline([
    ('imputer', SimpleImputer(strategy='mean')),
    ('scaler', MinMaxScaler())
])

X_transformed = pipeline.fit_transform(X_train)
```

## Quick Start: Series Smoothing

```python
from aeon.transformations.series.smoothing import MovingAverage

# Smooth individual time series
smoother = MovingAverage(window_size=5)
y_smoothed = smoother.fit_transform(y)
# Univariate output shape: (1, len(y) - window_size + 1)
```

## Algorithm Selection

### For Feature Extraction:
- **Speed + Performance**: MiniRocket
- **Interpretability**: Catch22, TSFresh
- **Dimensionality reduction**: PAA, SAX, PCA
- **Discriminative patterns**: Shapelet transforms
- **Comprehensive features**: TSFresh (with longer runtime)

### For Preprocessing:
- **Normalization**: Normalizer, MinMaxScaler
- **Smoothing**: MovingAverage, SavitzkyGolayFilter
- **Missing values**: SimpleImputer
- **Frequency analysis**: DWTTransformer, Fourier methods

### For Symbolic Representation:
- **Fast approximation**: PAA
- **Alphabet-based**: SAX
- **Frequency-based**: SFA, SFAFast

## Best Practices

1. **Fit on training data only**: Avoid data leakage
   ```python
   transformer.fit(X_train)
   X_train_tf = transformer.transform(X_train)
   X_test_tf = transformer.transform(X_test)
   ```

2. **Pipeline composition**: Chain transformers for complex workflows
   ```python
   pipeline = CollectionTransformerPipeline([
       ('imputer', SimpleImputer()),
       ('scaler', Normalizer()),
       ('features', Rocket())
   ])
   ```

3. **Feature selection**: TSFresh can generate many features; consider selection
   ```python
   from sklearn.feature_selection import SelectKBest
   selector = SelectKBest(k=100)
   X_selected = selector.fit_transform(X_features, y)
   ```

4. **Memory considerations**: Some transformers memory-intensive on large datasets
   - Use MiniRocket instead of ROCKET for speed
   - Consider downsampling for very long series
   - Use ROCKETGPU for GPU acceleration

5. **Domain knowledge**: Choose transformations matching domain:
   - Periodic data: Fourier-based methods
   - Noisy data: Smoothing filters
   - Spike detection: Wavelet transforms
reverse-engineer-anythingmorluto/reaReverse engineer native, managed, Electron/JavaScript, packaged, firmware, and browser targets with REA, and build agent environments (AgentEnv bundles) of web applications from a live instance or a capture, and of Linux desktop apps with a task from a request. Use shipped-artifact or requested runtime evidence to explain features, compare versions, decompile code, or guide a reconstruction. Skip REA for ordinary source-repository architecture analysis.Stars: 471kUpdated Claude CodeCodexVerifiedInstall
diagnosing-superpowersobra/superpowersUse when a superpowers session went wrong and your human partner wants to know why — repeated work, ignored plans, stumbles, poor results, a skill that didn't fire, "it took too long", "why is it so expensive", "what is it doing" — or wants to build a bug report for the superpowers maintainers, for the current session or a past one identified by id or path, on any harness.Stars: 322kUpdated Claude CodeCodexVerifiedInstall
dispatching-parallel-agentsobra/superpowersUse when facing 2+ independent tasks that can be worked on without shared state or sequential dependenciesStars: 322kUpdated Claude CodeCodexVerifiedInstall
executing-plansobra/superpowersUse when executing an implementation plan in the current session as the implementer yourself — your human partner chose inline execution, or no subagent tool is availableStars: 322kUpdated Claude CodeCodexVerifiedInstall