You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think that _embed, _filt, _wavelet_coefs (in utils.py) should not be private functions and should be added (along with power_spectrum) to MNE-features' API. The reason for that is that those functions are "building blocks" for user-defined feature functions. For instance, it would be great if they could do:
from mne_features.utils import power_spectrum
from mne_features.feature_extraction import extract_features
def myspectralfeature(sfreq, data):
psd, _ = power_spectrum(sfreq, data)
...
return ...
selected_funcs = ['mean', 'variance', ('myfunc', myspectralfeature)]
features = extract_features(epochs_data, sfreq, selected_funcs)
It is implicit that, for any feature function, if sfreq is one of the parameters, then it should be placed first because unless feature_funcs[alias] = partial(func, sfreq) (in _get_feature_funcs) will not work as expected. This should be mentioned in the doc... Or partial(func, sfreq) should be changed for partial(func, **{'sfreq': sfreq}).
The text was updated successfully, but these errors were encountered:
_embed
,_filt
,_wavelet_coefs
(in utils.py) should not be private functions and should be added (along withpower_spectrum
) to MNE-features' API. The reason for that is that those functions are "building blocks" for user-defined feature functions. For instance, it would be great if they could do:sfreq
is one of the parameters, then it should be placed first because unlessfeature_funcs[alias] = partial(func, sfreq)
(in_get_feature_funcs
) will not work as expected. This should be mentioned in the doc... Orpartial(func, sfreq)
should be changed forpartial(func, **{'sfreq': sfreq})
.The text was updated successfully, but these errors were encountered: