pyeeg.features.FeatureReducer.fit
- FeatureReducer.fit(features: ndarray) FeatureReducer
Fit the reducer to the features.
Computes the components and the per-feature mean from
featuresaccording toself.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:
- Raises:
ValueError – If
featuresis not a non-empty 2D numpy array, or ifself.config.methodis not one of"pca","ica", or"none".