# How to interpret mne\_connectivity results

**URL:** <https://mne.discourse.group/t/how-to-interpret-mne-connectivity-results/6628>\
**Category:** Support & Discussions\
**Tags:** eeg, connectivity\
**Created:** [March 30, 2023, 1:53pm UTC](https://mne.discourse.group/t/how-to-interpret-mne-connectivity-results/6628 "2023-03-30T13:53:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RamzanBersanov](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/ramzanbersanov/32/2404_2.png) [@RamzanBersanov](https://mne.discourse.group/u/RamzanBersanov)\
**Post date:** [March 30, 2023, 1:53pm UTC](https://mne.discourse.group/t/how-to-interpret-mne-connectivity-results/6628/1 "2023-03-30T13:53:57Z")

</div>

Hello everyone!  
I’m using:

- MNE version: 1.3.0
- operating system: e.g. macOS 13

I’m new to connectivity analysis (and really any EEG analysis) and I have got a connectivity matrix using this code script:

```python
con_methods = ['wpli']
con_freqs = ['4-30', '4-8', '8-13', '13-20', '20-30', '8-10', '10-13']
freqs_min = [int(x.split('-')[0]) for x in con_freqs]
freqs_max = [int(x.split('-')[1]) for x in con_freqs]
sen_or_sour = 'sensors'

def calculate_conn(data, con_methods, sfreq, freqs_min, freqs_max, node_names, person, output_folder):

    for con_method in con_methods:
        con = mne_connectivity.spectral_connectivity_epochs(data, method = con_methods,
                                                                                       mode = 'multitaper',
                                                                                       sfreq=sfreq, fmin=freqs_min,
                                                                                       fmax = freqs_max, faverage = True,
                                                                                       mt_adaptive = True, n_jobs = -1)
        con = con.get_data(output='dense')
    
    for shp in range(0, con.shape[2]):
        output_filename = f'{output_folder}/{person}_{sen_or_sour}_{con_method}.csv'
        savefile = pd.DataFrame(np.array(con[:,:,shp]))
        savefile.columns = savefile.index = node_names

        savefile.to_csv(output_filename)

epochs = epoching(raw, 6., 0.5) #type - numpy array
person = 'man'
calculate_conn(epochs, con_methods, epochs.info['sfreq'], freqs_min, freqs_max, epochs.info['ch_names'], person, output_folder)

```

Please someone explain me how do I enterprise the results? I have a table now with values 1 and values between 0 and 1. Do I understand correctly there is no certain values or cutoffs that tell brain regions are interconnected significantly more than the others? What is a common practice interpreting the results?

I’m performing analysis on a EEG of epilepsy patient. Is there any way I can tell their brain connectivity do or do not differ from Normal EEG? Should I compare them?

Really any answers or suggestions on analysis are highly appreciated!

---

<div class="post-metadata">

**Author:** ![drammock](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/drammock/32/4_2.png) [@drammock](https://mne.discourse.group/u/drammock)\
**Post date:** [April 7, 2023, 10:29pm UTC](https://mne.discourse.group/t/how-to-interpret-mne-connectivity-results/6628/2 "2023-04-07T22:29:05Z")

</div>

This doesn’t answer your question about interpretation, but note that it appears that you’re using the same `output_filename` for each slice of axis 2; so if your `con` has shape (n\_sensors, n\_sensors, n\_frequencies) then your saved file will only contain the last frequency bin (all others are getting overwritten on each iteration of the loop).

Since you appear to be using `wpli` method, the relevant reference (from the docstring of the `spectral_connectivity_epochs` function) is this one: [https://doi.org/10.1016/j.neuroimage.2011.01.055](https://doi.org/10.1016/j.neuroimage.2011.01.055) Presumably the interpretation can be gleaned from there.

cc @adam2392 who might have better answers ready-to-hand

---

<div class="post-metadata">

**Author:** ![adam2392](https://yyz2.discourse-cdn.com/free1/user_avatar/mne.discourse.group/adam2392/32/35_2.png) [@adam2392](https://mne.discourse.group/u/adam2392)\
**Post date:** [April 8, 2023, 12:22am UTC](https://mne.discourse.group/t/how-to-interpret-mne-connectivity-results/6628/3 "2023-04-08T00:22:27Z")

</div>

Interpretation is left to the user and is dependent on your assumptions and data. I think certain packages implement graph-based statistics: [Overview of graspologic — graspologic 3.0.0 documentation](https://microsoft.github.io/graspologic/latest/index.html)
