我已经把每个作者在每篇文章中的贡献值算出来了,怎么算两两合作的权重呀?


import numpy as np
out_degree = np.sum(adjacency_matrix, axis=1)
in_degree = np.sum(adjacency_matrix, axis=0)
coauthorship_weight = out_degree + in_degree
author_weights = {i: coauthorship_weight[i] for i in range(len(coauthorship_weight))}