不明白Y = labels[random_unlabels_points]和Y_pred=Y_pred[random_unlabels_points]
来源:6-21 半监督-标签传播算法
Hsin1
2019-04-01
print(“unlabels:”,list(labels).count(-1))
print(Y)
得到:
unlabels: 41
[0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2]
random_unlabels_points数组就是一组True和False的数组
labels[random_unlabels_points]=-1
这句话的意思是,labels与random…里对应位置为True的数赋为-1,其他值不变
但不知道Y里面的值怎么来的。一样的还有Y_pred=Y_pred[random_unlabels_points]
希望老师解答一下 谢谢
写回答
1回答
-
途索
2019-04-07
同学你好,Y是从labels来的,labels是sklearn的dataset包导入的自带iris数据。
00
相似问题