hyperspy.learn.svd_pca module¶
-
hyperspy.learn.svd_pca.
svd_pca
(data, fast=False, output_dimension=None, centre=None, auto_transpose=True)¶ Perform PCA using SVD.
Parameters: - data (numpy array) – MxN array of input data (M variables, N trials)
- fast (bool) – Wheter to use randomized svd estimation to estimate a limited number of componentes given by output_dimension
- output_dimension (int) – Number of components to estimate when fast is True
- centre (None | 'variables' | 'trials') – If None no centring is applied. If ‘variable’ the centring will be performed in the variable axis. If ‘trials’, the centring will be performed in the ‘trials’ axis.
- auto_transpose (bool) – If True, automatically transposes the data to boost performance
Returns: - factors (numpy array)
- loadings (numpy array)
- explained_variance (numpy array)
- mean (numpy array or None (if center is None))