def statistics(self):
"""Return some topological information about the experiment"""
stat = {}
stat["net diameter"] = nx.diameter(self.network)
stat["net radius"] = nx.radius(self.network)
stat["net asp"] = nx.average_shortest_path_length(self.network)
stat["input asp"] = net.inputASL(self.network, self.inputc)
for m in self.measures.values():
distr = net.distances_to_roi(self.network, self.inputc,m.roi)
stat["stim to roi distances, mean",m.name] = np.mean(distr)
stat["stim to roi distances, var",m.name] = np.var(distr)
centrs = nx.closeness_centrality(self.network)
stat["roi centralities",m.name] = [centrs[tuple(node)]
for node in np.transpose(m.roi.nonzero())]
return stat
评论列表
文章目录