Layer 1: Time Series Anomaly Detection ======================================== PyOD ships 5 stable time series detectors plus 2 experimental (``SAND``, ``AnomalyTransformer``), all using the same ``fit``/``predict``/``decision_function`` API. The stable five are what ``ADEngine.list_detectors(data_type='time_series')`` returns; the experimental pair is available by class import but not routed by ADEngine yet. Rankings from `TSB-AD benchmark `_ :cite:`a-liu2024tsb` (NeurIPS 2024, 1,070 datasets, 40 algorithms). **Input format**: numpy array of shape ``(n_timestamps,)`` for univariate or ``(n_timestamps, n_channels)`` for multivariate. **Output**: ``decision_scores_`` of shape ``(n_timestamps,)``. .. code-block:: python from pyod.models.ts_kshape import KShape clf = KShape(window_size=20) clf.fit(X_train) scores = clf.decision_scores_ ---- Detectors --------- .. list-table:: :widths: 16 52 8 24 :header-rows: 1 * - Type - Detector - Year - Ref * - Windowed - `TimeSeriesOD `__: any PyOD detector on sliding windows - 2026 - * - Subsequence - `MatrixProfile `__: STOMP, transductive - 2016 - Yeh et al. * - Frequency - `SpectralResidual `__: FFT saliency - 2019 - Ren et al. * - Clustering - `KShape `__: shape-based, #2 TSB-AD overall - 2015 - Paparrizos et al. * - Streaming - `SAND `__: drift adaptation - 2021 - Boniol et al. * - Deep Learning - LSTMAD: LSTM prediction + Mahalanobis - 2015 - Malhotra et al. * - Deep Learning - AnomalyTransformer: attention discrepancy - 2022 - Xu et al. ---- Transductive vs Inductive -------------------------- Most time series detectors support both ``fit()`` and ``decision_function(X_test)``. One exception: * ``MatrixProfile`` is **transductive**: use ``decision_scores_`` after ``fit()``, no out-of-sample ``predict()``.