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
{{ message }}
Repository navigation
Repairing artifacts with regression - Using the wrong regression coefficients #12977
In the aforementioned tutorial, under "Subtract the evoked response from the epoch data before regression":
I think that
epochs_clean_sub = model_plain.apply(epochs)
is incorrect, as this applies the regression coefficients from model_plain, which was trained on the default epochs, rather than epochs.subtract_evoked().
I think it should be
epochs_clean_sub = model_sub.apply(epochs)
instead. Otherwise, model_sub appears to be redundant.
Huh, I think you are right @JacPhe . Would you be up for a PR to fix this?
Also just to be safe, CC'ing @wmvanvliet as the author of that tutorial... On line 152 shouldn't model_plan.apply(...) actually be model_sub.apply(...)?
Activity
welcome commentedon Nov 20, 2024
Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴
scott-huberty commentedon Nov 20, 2024
Huh, I think you are right @JacPhe . Would you be up for a PR to fix this?
Also just to be safe, CC'ing @wmvanvliet as the author of that tutorial... On line 152 shouldn't
model_plan.apply(...)actually bemodel_sub.apply(...)?mne-python/tutorials/preprocessing/35_artifact_correction_regression.py
Lines 143 to 154 in a99aa9f
JacPhe commentedon Nov 20, 2024
I've sent a pull request just in case, hopefully that helps!
Updated doc/names.inc, and doc/changes/devel to correspond with fixin…
Updated changelog for issue mne-tools#12977.
Changed epochs_clean_sub = model_plain.apply(epochs) to epochs_clean_…
Merge remote-tracking branch 'upstream/main' into cola5