Cluster permutation test for decoding accuracies

Hi,

I have computed scores across time for all my subjects (using SlidingEstimator) and now I want to test if these scores are different from theoretical chance level. I have seen the spatio_temporal_cluster_test() function but I don’t understand the shape that X should have.

Imagine that my data has 1000 time points (so I should also have 1000 decoding scores, each per time point), 5 frequency bins and 64 channels. Should it be (1000, 1000, 5, 64) for each subject? And then I’m guessing I should append every X for every participant to get a list, and use it as the input to the function.

I have checked some threads asking similar questions but none seem to solve my problem.

Edit:

If it helps, I want to achieve something like this from Grootswagers et al 2017:

Showing the decoding accuracies across time and the time points where the cluster permutation test was significant. I don’t think there are specific functions in MNE to do this kind of plot (would be awesome), but I’m just using it to clarify.

Hello, we actually do something similar in MNE-BIDS-Pipeline, see this example:

https://mne.tools/mne-bids-pipeline/1.3/examples/ERP_CORE/sub-average_ses-ERN_task-ERN_report.html#global-23

We also add another figure to make it easier to understand how clusters were formed:

Unfortunately, the code to produce these figures is a little convoluted and specifically adjusted to work with data from MNE-BIDS-Pipeline, and not with arbitrary user data.

You can take a look at it here:

Best wishes,
Richard

Hi Richard,

Thanks for the response! That kind of plot is what I want to get, but we have already analyzed all of our data and having to run it through the pipeline again is not very desirable… I’ll try to replicate something like it outside the MNE-BIDS-Pipeline, thanks!