pyeeg.features.FeatureReducer.transform

FeatureReducer.transform(features: ndarray) ndarray

Transform features to reduced space.

Projects features onto the fitted components (after centering with the fitted mean). With method='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 for method='none'.

Return type:

ndarray

Raises:
  • RuntimeError – If the reducer has not been fitted (call fit() first).

  • ValueError – If features is not a non-empty 2D numpy array, or if self.config.method is not one of "pca", "ica", or "none".