How to conduct the significant test on the decoding results?

  • MNE-Python version: 0.23.0
  • operating system: Linux

Hi! Guys,

I’m wondering how to conduct the significant test in decoding analysis.
Here is my code:

epo_data = epoch.get_data()
labels_ani = epoch.metadata['feature_animacy']
n_cvsplits = 10
cv = StratifiedKFold(n_splits=n_cvsplits)
clf = make_pipeline(
    StandardScaler(), # Z-score data, because gradiometers and magnetometers have different scales
    LogisticRegression(random_state=0, n_jobs=12, max_iter=500)
)
sliding_ani = SlidingEstimator(clf, n_jobs=12)
sliding_ani.fit(epo_data, labels_ani)
auc_fea_ani = cross_val_multiscore(sliding_ani, epo_data, labels_ani, cv=cv, n_jobs=12)
auc_fea_ani_avg = np.nanmean(auc_fea_ani, axis=0)

And here is the plot of the result:

I’m trying to figure out how to find the significant cluster in the time dimension, and produce the plot like this in which the significant time range was marked:

.

I searched in MNE’s tutorial, but there seems no topic about the significance test in decoding analysis, did I miss it? or are there some functions that can help me do the significance test?

Thanks a lot! :sparkling_heart: :sparkling_heart: :sparkling_heart:

I don’t know any code to do this type of plot.

but I am sure it would be interesting to MNE folks

can you give it a try? maybe find some code we could get some inspiration from?

Alex

Hi! Alex,
Actually, I’m more interested in how to find the significant cluster, and I think maybe I found a function that can be used to test the significance of decoding: mne.stats.permutation_cluster_test — MNE 0.23.0 documentation
Maybe I can feed the decoding time series obtained from the decoding process, and mne.stats.permutation_cluster_test() might return the statistical values of each time point. I’m not sure if it will work but I might give it a try, what do you think?

Best

yes sounds good

Alex