Hi, I know that there already is a discussion about this error, but mine doesn’t come changing data dtype.
I’m trying to make this simple pipeline and evaluate it’s accuracy, but for some reason I keep having this error
ValueError: data copying was not requested by copy=None but it was required to get to double floating point precision cross_val_score on the cross_val_score line.
The weird thing is that I first encountered this error when trying to setup the pipeline with sklearn method ‘make_pipeline’. So I switched to this basic Pipeline(steps=…) call, and the first time I ran this code it actually worked. And when running it again it wouldn’t work.
I’m kinda lost here.
Here is my code :
epochs_data = epochs.get_data() scores =  cv = ShuffleSplit(10, test_size=.3, random_state=99) reg = LogisticRegression() csp = CSP(n_components=10, reg=None, log=True, norm_trace=False) clf = Pipeline(steps=[('CSP', csp), ('LogisticRegression', reg)]) scores = cross_val_score(clf, epochs_data, labels, cv=cv, n_jobs=-1)
I got the epochs object with :
# Files corresponds the raw data (concatenated) events, event_id = events_from_annotations(files, event_id=event_mapping) epochs = Epochs(files, events, event_id, tmin, tmax, proj=True, picks=picks, baseline=None, preload=True)