pyeeg.features.FeatureReducer.transform
- FeatureReducer.transform(features: ndarray) ndarray
Transform features to reduced space.
Projects
featuresonto the fitted components (after centering with the fitted mean). Withmethod='none', the input is returned unchanged.- Parameters:
features (ndarray) – 2D array of shape
(n_samples, n_features). The number of features must match the fitted dimensionality.- Returns:
reduced – 2D array of shape
(n_samples, n_components)with the reduced features, or the input unchanged formethod='none'.- Return type:
ndarray
- Raises:
RuntimeError – If the reducer has not been fitted (call
fit()first).ValueError – If
featuresis not a non-empty 2D numpy array, or ifself.config.methodis not one of"pca","ica", or"none".