ITimeSeriesClassifier<T>

Interfaces · AiDotNet.Interfaces

Interface for time series classification models.

Implements: IClassifier<T>

Known implementations: MiniRocketClassifier<T>, RocketClassifier<T>, TimeSeriesClassifierBase<T>, TimeSeriesForestClassifier<T>

For Beginners

Time series classification assigns labels to entire sequences rather than individual data points. For example, classifying an ECG recording as “normal” or “abnormal”, or classifying a gesture based on accelerometer data.

How It Works

How time series classification differs from regular classification:

  • Input is a sequence (time series) not a single feature vector
  • Order of observations matters
  • May have multiple channels (multivariate time series)
  • Sequences can have different lengths

Common Approaches:

  • Distance-based: DTW + 1-NN, Shapelet-based
  • Feature extraction: ROCKET, MiniRocket, TSFresh
  • Deep learning: CNN, LSTM, Transformers
  • Ensemble: Time Series Forest, BOSS ensemble

Applications:

  • Medical diagnosis (ECG, EEG analysis)
  • Human activity recognition (accelerometer data)
  • Speech/audio classification
  • Anomaly detection in sensor data
  • Gesture recognition

Properties

Property Summary
bool SupportsVariableLengths { get; } Gets whether the classifier can handle variable-length sequences.
int NumChannels { get; } Gets the number of channels (variables) in the time series.
int SequenceLength { get; } Gets the expected sequence length for input time series.

Methods

Method Summary
Matrix<T> PredictSequenceProbabilities(Tensor<T> sequences) Predicts class probabilities for a batch of time series sequences.
Vector<T> PredictSequences(Tensor<T> sequences) Predicts class labels for a batch of time series sequences.
void TrainOnSequences(Tensor<T> sequences, Vector<T> labels) Trains the classifier on a collection of time series sequences.