def get_data_prop(self):
prop = super(frontendNetwork, self).get_data_prop()
if self.is_symmetric():
nnz = np.triu(self.data).sum()
else:
nnz = self.data.sum()
_nnz = self.data.sum(axis=1)
d = {'instances': self.data.shape[1],
'nnz': nnz,
'nnz_mean': _nnz.mean(),
'nnz_var': _nnz.var(),
'density': self.density(),
'diameter': self.diameter(),
'clustering_coef': self.clustering_coefficient(),
'modularity': self.modularity(),
'communities': self.clusters_len(),
'features': self.get_nfeat(),
'directed': not self.is_symmetric()
}
prop.update(d)
return prop
评论列表
文章目录