pnum, gnum = truth_mat.shape dimension = args.dimensions gene_emb = np.zeros(gnum * dimension).reshape(gnum, dimension) phen_emb = np.zeros(pnum * dimension).reshape(pnum, dimension) for i in range(1, gnum + 1): pair1 = 'g' + str(i) if pair1 not in true_index: continue gi = np.array(result_vector.loc['g' + str(i)]) gene_emb[i - 1, :] = gi for i in range(1, pnum + 1): pair2 = 'p' + str(i) if pair2 not in true_index: continue pi = np.array(result_vector.loc['p' + str(i)]) phen_emb[i - 1, :] = pi pred_mat = phen_emb.dot(gene_emb.T) #-------------------------------new AUCn------------------------------------- pred_mat = np.asarray(pred_mat) #R_vers = np.ones((pnum, gnum)) - truth_mat print(args.method) print("基因关联表型预测:", eval.calculate_metrics_sk(pred_mat, truth_mat, mask_mat)) print("基因关联表型预测:", eval.AUC_main(pred_mat, truth_mat, mask_mat))