Module connectome.visualization.viz_utils

helper functions for the visualization of results

Functions

def ordered_regions() ‑> tuple

return list of indexes from yeo 7

def plot_coef_elastic_net(model, title='Elastic Net coefficients')

plot coefficients of elastic net model

Args

model
fitted elastic net model

Returns

plot

def plot_feature_map(heatmap, title, aggregated_network=False, ordered=False, cmap='gist_heat_r', center_0=False)

Plots a heatmap of the connectivity matrix

Args

heatmap
The image data
title
A title for the plot
aggregated_network
Boolean, whether the matrices were aggregated based on yeo7
ordered
Boolean, whether to reorder the matrices based on the yeo7 network. (True is recommended when training with Brainnetome data. Only applicable to data based on the brainnetome atlas.
cmap
Choice of colormap from matplotlib
center_0
Boolean, whether to center the cmap around 0

Returns

Connectivity matrix plot

def plot_grouped_FI(df_importance, title='Grouped Permutation Feature Importance')

plot results grouped feature importance (groups based on yeo7 network)

Args

df_importance
pd.DataFrame with results from calculation grouped FI. First column contains regions, second column contains importance values

Returns

plot