nws_tools.get_meannw

nws_tools.get_meannw(nws, percval=0.0)[source]

Helper function to compute group-averaged networks

Parameters:

nws : NumPy 3darray

N-by-N connection matrices of numsubs subjects. Format is nws.shape = (N,N,numsubs) such that nws[:,:,i] = N x N connection matrix of i-th subject

percval : float

Percentage value, such that connections not present in at least percval percent of subjects are not considered, thus 0 <= percval <= 1. Default setting is percval = 0.0

Returns:

mean_wghted : NumPy 2darray

N-by-N mean value matrix of numsubs matrices stored in nws where only connections present in at least percval percent of subjects are considered

percval : float

Percentage value used to generate mean_wghted

See also

None

Notes

If the current setting of percval leads to a disconnected network, the code increases percval in 5% steps to ensure connectedness of the group-averaged graph. The concept of using only a certain percentage of edges present in subjects was taken from [R8].

References

[R8](1, 2) M. van den Heuvel, O. Sporns. Rich-Club Organization of the Human Connectome. J. Neurosci, 31(44) 15775-15786, 2011.