-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH: refactor Xdawn and linear_regression_raw #2332
Comments
yep, some overlap here.
Xdawn use the predictor to recreate pseudo signal and estimates a covariance matrix used for the filters estimations. I think i can do without it but we have to check it does no impact performances significantly.
Xdawn reconstruct signal from epochs. It is also why it raise an exception if you try to feed xdawn with overlapped epochs where the baseline has been corrected. |
Small side points, that could be addressed during this refactoring:
|
Hi, The original intension of the code is to follow as close as possible the original algorithm. we can imagine a lot of variation, but then we should probably find a better name. If we go back to the basic, Xdawn algorithm is in 3 step :
Adding continuous regressor could be done in step 1, then the next part don't need any change. |
Thanks for the clarifications!
Ok, let's keep things separated then, and relabel if necessary.
Ok, I'd be happy to (/ need to) work a bit on this, but I'd need guidance. @jona-sassenhagen, where you thinking of something along these lines too? |
Yes. @agramfort @alexandrebarachant thoughts on allowing XDawn to take Raw input? |
Why do you want this ? If We do this we highly complexify the API
|
Xdawn and linear_regression_raw overlap a lot. Both use toeplitz to construct a big predictor matrix from event arrays, and return the coefficients of regressing the brain data. Possibly, linear_regression_raw could be extended slightly to function as a backend for Xdawn, as discussed with @alexandrebarachant .
The main issues:
I don't think it would make much sense to refactor in the other direction (use Xdawn as the estimator for linear_regression_raw, or fully lose linear_regression_raw in favour of big Xdawn API enlargement) due to API and usage case differences
Maybe this should wait until #2331 has been addressed though.
@alexandrebarachant
The text was updated successfully, but these errors were encountered: