Conversation
|
Hey @SophieHerbst, thanks for pinging me via email. |
|
PS: Cool that you want to add this! :) |
if @larsoner and @hoechenberger agree of course. But to me this is the missing piece I have been looking for in a while to be able to interpret the CSP results. |
👍👍👍👍👍 |
|
|
||
| # COEFS | ||
| clf.fit(X, y) | ||
| weights_csp = mne.decoding.get_coef(clf, "patterns_", inverse_transform=True) |
There was a problem hiding this comment.
Typically this is all I use. Why also take the csp.patterns_? csp.fit(X, y) results anywhere else so it's a bit weird to me to add them here. It seems like we should just use these weights_csp. And maybe we should call them clf_patterns_ because they're really the patterns inverse transformed from the CSP all the way back through the other steps (e.g., PCA, sensor scaling)?
There was a problem hiding this comment.
that is exactly where I am lost in the terminology..
my approach was to save the weights in this step to pick them up in a separate source projection step later
There was a problem hiding this comment.
I wanted to save both, because in @britta-wstnr's code they are combined during beamforming:
stc_csp = beamform_components(weights_csp, sensor_pattern_csp, spat_filter,
fwd, multipliers=multiplier)
There was a problem hiding this comment.
The idea here is to combine the coefficients and the CSP components. The (Haufe et al.) patterns are not easily beamform-able as they do not represent classical sink-source patterns anymore but refer to the decoding classes. Using the CSP components is a work-around for that.
|
Yes so far I have been projecting inverse-transformed CSP clf |
|
I think I found it. |
|
With the above code, I get an error in _05_decoding_csp.py, at csp.fit_transform() |
|
I sometimes hit these and try to open issues on the relevant upstream trackers. In this case it's probably an OpenBLAS bug. You can try setting OMP_NUM_THREADS=1 in your env, sometimes it fixes it. In principle using Can you run the pipeline with and then also do and upload the |
|
... there is also a chance that upgrading your OpenBLAS / NumPy could fix the issue. Or switching away from using MKL if you're using it |
|
... in other words this sounds a lot like OpenMathLib/OpenBLAS#3044 . A couple of other useful outputs would be: |
|
Thanks @larsoner I updated numpy and am trying to run it again right now. |
Hello! I am trying to implement Britta's and Jean-Remy's best of both world approach to project the CSP decoding patterns to source.
I am able to do it on my data in my own code, but I am struggling to extract the patterns and coefficients in the pipeline code.
On the one hand, I am a bit lost in the terminology between patterns, coefficients, and filters.
On the other hand, when using Britta's code, I get an error message:
Can you help me understand how I need to change the decoding pipeline to make it work?