class WhiteningTransform¶
- class deeptime.covariance.WhiteningTransform(sqrt_inv_cov: ndarray, mean: Optional[ndarray] = None, dim: Optional[int] = None)¶
Transformation of data into a whitened space. It is assumed that for a covariance matrix \(C\) the square-root inverse \(C^{-1/2}\) was already computed. Optionally a mean \(\mu\) can be provided. This yields the transformation
\[y = C^{-1/2}(x-\mu). \]- Parameters:
sqrt_inv_cov ((n, k) ndarray) – Square-root inverse of covariance matrix.
mean ((n, ) ndarray, optional, default=None) – The mean if it should be subtracted.
dim (int, optional, default=None) – Additional restriction in the dimension, removes all but the first dim components of the output.
See also
deeptime.numeric.spd_inv_sqrt
Method to obtain (regularized) inverses of covariance matrices.
Methods
transform
(data, **kwargs)Transforms the input data.
- __call__(x: ndarray)¶
Evaluation of the observable.
- Parameters:
x ((N, d) np.ndarray) – Evaluates the observable for N d-dimensional data points.
- Returns:
out – Result of the evaluation for each data point.
- Return type:
(N, p) np.ndarray
- transform(data, **kwargs)¶
Transforms the input data.
- Parameters:
data (array_like) – Input data.
- Returns:
transformed – The transformed data
- Return type:
array_like