TimeSeriesClassifierBase<T>
Base Classes ยท AiDotNet.Classification.TimeSeries
Base class for time series classification models.
Inheritance: ClassifierBase<T> โ TimeSeriesClassifierBase<T>
Implements: ITimeSeriesClassifier<T>
For Beginners
This base class provides common functionality for time series classifiers. It handles sequence-based input (3D tensors) and provides the infrastructure for training on time series data while inheriting all the classification machinery from ClassifierBase.
How It Works
Key concepts:
- Sequence: A time-ordered series of observations (e.g., 100 time steps)
- Channel: A variable measured at each time step (e.g., x, y, z accelerometer)
- Sample: One complete time series with its class label
Input format: Sequences are passed as 3D tensors with shape: [num_samples, sequence_length, num_channels]
Properties
| Property | Summary |
|---|---|
bool SupportsVariableLengths { get; } |
Gets whether this classifier supports variable-length sequences. |
int NumChannels { get; set; } |
Gets or sets the number of channels (variables) in the time series. |
int SequenceLength { get; set; } |
Gets or sets the expected sequence length. |
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. |