Representations#
Representations of multivariate time series: latent-variable models, covariance geometry, piecewise, symbolic, qualitative (episode), feature, signature, network, image and matrix-profile representations.
PCA and probabilistic PCA models, recursive PCA, similarity factors, SPD geometry, piecewise and symbolic approximations, qualitative episodes, features and path signatures, graphs, images and matrix profiles.
Classes#
|
Principal component model with monitoring statistics. |
|
Probabilistic PCA (Tipping and Bishop, 1999). |
|
Recursive (exponentially weighted) PCA with a variable forgetting factor. |
|
Piecewise linear approximation of a (multivariate) series. |
|
SAX transform with |
|
One episode: primitive code, half-open sample range and magnitude (signed change of the signal over the episode). |
Functions#
|
Number of lags of dynamic PCA. |
|
Number of retained components. |
|
Krzanowski's PCA similarity factor (1979): \(s_{PCA}=\frac1p\operatorname{tr}(U_1^{\mathsf T}U_2U_2^{\mathsf T}U_1) =\frac1p\sum_{i,j}\cos^2\Theta_{ij}\), in [0, 1]. |
|
Eigenvalue-weighted PCA similarity factor (Johannesmeyer, 1999; Singhal and Seborg, 2002). |
|
Eros, the extended Frobenius norm similarity of Yang and Shahabi (2004): \(\sum_i w_i\lvert\cos\Theta_i\rvert\) over corresponding eigenvectors. |
|
Eros weights (Yang and Shahabi, 2004): the normalized eigenvalue profiles averaged over a learning set, renormalized to sum to one. |
|
Principal angles (radians, increasing) between the column spaces of |
|
Geodesic (arc-length) distance on the Grassmann manifold: \(\sqrt{\sum_i\theta_i^2}\). |
|
Projection (chordal) distance \(\sqrt{\sum_i\sin^2\theta_i}\). |
|
Distance similarity factor of Singhal and Seborg (2005): the probability that the Mahalanobis distance between the means is exceeded under a standard normal reference, \(2(1-\Phi(\Delta))\). |
|
\(\lVert\log A-\log B\rVert_F\) (Arsigny et al., 2007). |
|
\(\sqrt{\sum_i\log^2\lambda_i(A^{-1}B)}\) (Pennec et al., 2006). |
|
\(\bigl(\operatorname{tr}A+\operatorname{tr}B-2\operatorname{tr} (A^{1/2}BA^{1/2})^{1/2}\bigr)^{1/2}\), the 2-Wasserstein distance of two centered Gaussians (Bhatia et al., 2019). |
|
2-Wasserstein distance between \(N(\mu_1,A)\) and \(N(\mu_2,B)\). |
|
Symmetric Kullback--Leibler (Jeffreys) divergence of two Gaussians. |
|
Mean of SPD matrices: |
|
PAA of every variable: |
|
Step-function reconstruction of a PAA representation. |
|
APCA: bottom-up segmentation with the L2 cost (segment means are |
|
Piecewise linear approximation. |
|
Indices of the |
|
Shorthand for |
|
ABBA symbolic representation of a univariate series. |
|
SFA word of a univariate series: the first |
|
Episode sequence of a univariate signal. |
|
The primitive codes of an episode sequence as a string. |
|
Size class ( |
|
Episodes of a multivariate signal: of the first principal component ( |
|
Feature dictionary of one (multivariate) series: every feature of |
|
Feature matrix of a collection as a pandas DataFrame (one row per series). |
|
Permutation entropy of the ordinal patterns of length |
|
Truncated path signature (levels 1..``depth``, |
Natural visibility graph (divide and conquer, \(O(T\log T)\) on average). |
|
|
Horizontal visibility graph: |
|
SPC-zone labelled horizontal visibility graph. |
|
Control-chart zone of every sample: |
|
Boolean flags of the four Western Electric rules: beyond 3σ; 2 of 3 beyond 2σ on one side; 4 of 5 beyond 1σ on one side; 8 in a row on one side of the center. |
|
Directed, weighted transition network of the ordinal patterns of length |
|
ε-recurrence network: nodes are (delay-embedded) states, linked if closer than |
Summary features: mean degree, degree entropy, clustering, assortativity, density; for directed graphs the mean in/out degree asymmetry; for zone-labelled graphs the fraction of edges per zone pair. |
|
|
Recurrence plot. |
|
Gramian angular field of a univariate series rescaled to [-1, 1] (optionally PAA-reduced to |
|
Markov transition field: entry |
|
Magnitudes of the first DFT coefficients of every variable (rows). |
|
Haar wavelet decomposition (approximation, details per level) of every variable; series are zero-padded to a power of two. |
|
Chebyshev polynomial coefficients of every variable (Cai and Ng, 2004). |
|
Indices and distances of the |
|
Matrix profile (nearest-neighbour distance) and its index. |
|
Subsequence width from the first dominant autocorrelation peak of every channel (median over channels), bounded to |
Constants#
str(object='') -> str str(bytes_or_buffer[, encoding[, errors]]) -> str |
|
ndarray(shape, dtype=None, buffer=None, offset=0, strides=None, order=None) |
|
Built-in immutable sequence. |