spine.math.decomposition
Numba JIT compiled implementation of decomposition routines.
Functions
Computes the principal components of a point cloud by computing the eigenvectors of the centered covariance matrix. |
Classes
|
Class-version of the Numba-accelerate |
- class spine.math.decomposition.PCA(*args, **kwargs)[source]
Class-version of the Numba-accelerate
principal_components()function.- n_components
Number of PCA components
- Type:
int
- components
(N_c, D) List of principal axes
- Type:
np.ndarray
- explained_variance
(N_c) Variance along each of the principal axes
- Type:
np.ndarray
Methods
fit(x)Computes the covariance and eigen-decompose the data.
class_type
- class_type = jitclass.PCA#79d09e89d210<n_components:int64>
- spine.math.decomposition.principal_components(x: ndarray) ndarray[source]
Computes the principal components of a point cloud by computing the eigenvectors of the centered covariance matrix.
- Parameters:
x (np.ndarray) – (N, d) Coordinates in d dimensions
- Returns:
(d, d) List of principal components (row-ordered)
- Return type:
np.ndarray