邻接矩阵应该是主对角线元素为0的对称矩阵,
如果是无权重的邻接矩阵,矩阵中不为零的元素都是1
它的每一行或者每一列的元素的和就是对应行或列的节点的度
脑网络中,可用Matlab-brain connectivity toolbox包计算网络属性
局部属性计算公式:
对应的函数:
节点度k:
Degree: Node degree is the number of links connected to the node. In directed networks, the in-degree is the number of inward links and the out-degree is the number of outward links. Connection weights are ignored in calculations.
网络密度:
[kden,N,K]=density_und(A);(二值化矩阵),函数计算同上述公式。输出kden为网络密度,n为节点数,k为边数(即为度值,也就是1的和)
网络节点度(在二值化矩阵中,度的意思就是连接该节点数值1的数量):
[deg]=degrees_und(A),函数计算同上述公式,输出deg即为节点度
其中,A为输入的邻接矩阵。注意,当A为NxN(通道)的脑连接矩阵时,输出结果只能为全脑的平均值,如需要对某个节点单独计算其【局部属性】,那么需要循环矩阵依次输如A的每行:
for i in range(size(A,1)):
deg[i]=degrees_und(A(i))