pyeeg.features.FeatureReducer.fit

FeatureReducer.fit(features: ndarray) FeatureReducer

Fit the reducer to the features.

Computes the components and the per-feature mean from features according to self.config.method. After fitting, the reducer can be used to transform new data.

Parameters:

features (ndarray) – 2D array of shape (n_samples, n_features).

Returns:

self – The fitted reducer.

Return type:

FeatureReducer

Raises:

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