How TS2Vec encoding modes work
mainThe .encode() method supports three primary modes for generating representations from time series data:
- Timestamp-level: The default mode. Returns a representation for every timestamp in the series. Shape:
(n_instances, n_timestamps, output_dims). - Instance-level: Set
encoding_window='full_series'. Returns a single representation vector for the entire time series instance. Shape:(n_instances, output_dims). - Sliding Inference (Causal): Set
causal=True,sliding_length, andsliding_padding. This allows for real-time style inference where the representation at timestamptis computed using only observations in the window[t - sliding_padding, t]. Shape:(n_instances, n_timestamps, output_dims).