.. _example_connectivity_plot_inverse_covariance_connectome.py: Computing a connectome with sparse inverse covariance ======================================================= This example constructs a functional connectome using the sparse inverse covariance. We use the `MSDL atlas `_ of functional regions in rest, and the :class:`nilearn.input_data.NiftiMapsMasker` to extract time series. Note that the inverse covariance (or precision) contains values that can be linked to *negated* partial correlations, so we negated it for display. As the MSDL atlas comes with (x, y, z) MNI coordinates for the different regions, we can visualize the matrix as a graph of interaction in a brain. To avoid having too dense a graph, we represent only the 20% edges with the highest values. .. rst-class:: sphx-glr-horizontal **Python source code:** :download:`plot_inverse_covariance_connectome.py ` .. literalinclude:: plot_inverse_covariance_connectome.py :lines: 23- **Total running time of the example:** 0.00 seconds ( 0 minutes 0.00 seconds)