将测试数据的真实标签设置为一个由正样本数量和负样本数量组成的一维数组,其中正样本标签为'1',负样本标签为'0'。将该数组的数据类型设置为浮点型。将测试数据的边集合并成一个二维数组,其中包括正样本边和负样本边。

test_true_label = np.hstack((np.ones(test_pos_edges.shape[0]), np.zeros(test_neg_edges.shape[0]))) 
    test_true_label = np.array(test_true_label, dtype='float32') 
    test_edges = np.vstack((test_pos_edges, test_neg_edges))
Python 中的测试数据处理:标签和边的合并

原文地址: https://www.cveoy.top/t/topic/ncae 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录