brainconn.utils.matrix

Other utility functions.

Functions

autofix(W[, copy]) Fix a bunch of common problems.
binarize(W[, copy]) Binarizes an input weighted connection matrix.
invert(W[, copy]) Inverts elementwise the weights in an input connection matrix.
normalize(W[, copy]) Normalizes an input weighted connection matrix.
threshold_absolute(W, thr[, copy]) This function thresholds the connectivity matrix by absolute weight magnitude.
threshold_proportional(W, p[, copy]) This function “thresholds” the connectivity matrix by preserving a proportion p (0<p<1) of the strongest weights.
weight_conversion(W, wcm[, copy]) W_bin = weight_conversion(W, ‘binarize’); W_nrm = weight_conversion(W, ‘normalize’); L = weight_conversion(W, ‘lengths’);