bha

cross_modularity(A, B, alpha, beta, T) Given two input (symmetrical) matrices A and B, this function
modularity_index(A, T) A newman spectral algorithm adapted from the brain connectivity toolbox.

cross_modularity

bha.cross_modularity(A, B, alpha, beta, T)

Given two input (symmetrical) matrices A and B, this function calculates the crossmodularity index X

Parameters:

A : array

squared matrice of N*N (typically connectivity matrices), being N the number of ROIs

B : array

squared matrice of N*N (typically connectivity matrices), being N the number of ROIs

alpha : float

artibitrary thersholds to binarize the two matrices (necessary for the similarity calculation)

beta : float

artibitrary thersholds to binarize the two matrices (necessary for the similarity calculation)

T : array

label vector: each element vector is defined as an integer corresponding to the module that ROI belongs to

Returns:

X : float

crossmodularity

Qa : array

modularities of inA associatted to partition T

Qb : array

modularities of inB associatted to partition T

L: float :

similarity between A and B

modularity_index

bha.modularity_index(A, T)

A newman spectral algorithm adapted from the brain connectivity toolbox. Original code: https://sites.google.com/site/bctnet/measures/list

Parameters:

A : array

squared matrice of N*N (typically connectivity matrices), being N the number of ROIs

T : array

label vector: each element vector is defined as an integer corresponding to the module that ROI belongs to

Returns:

Q : float

modularity index