External Email - Use Caution
Hello MNE users,
I am attempting to use the function mne.channels.find_ch_connectivity() to
generate a matrix of the channel connectivity. I'd like to use this matrix
as an input to mne.stats.spatio_temporal_cluster_1samp_test() for the
'connectivity' argument.
I am getting an error when I feed the output of find_ch_connectivity into
spatio_temporal_cluster_1samp_test.
Here is my code:
*connect_matrix=mne.channels.find_ch_connectivity(epochs.info
<http://epochs.info>,ch_type='eeg')*
*type(connect_matrix[0]) *
*--> out: scipy.sparse.csr.csr_matrix*
*obs,clusters,cluster_pv,H=mne.stats.spatio_temporal_cluster_1samp_test(
array_of_diffs, connectivity=connect_matrix, n_permuntations=10000)*
*--> ValueError: if a connectivity matrix is given, it must be a scipy
sparse matrix*
It seems that I am expected to input a different type of scipy sparse
matrix for the connectivity argument in the spatio_temporal_cluster_1samp
function, but I am unsure which one and how I might do so.
Or, if anyone has suggestions for how else I might construct a connectivity
matrix to pass into the spatio_temporal_cluster_1samp function, I would
greatly appreciate it!
Thank you, and best wishes,
Dillan Cellier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190731/f4d6bdea/attachment.html