我为多类别、多标签输出变量运行了随机森林分类器,得到以下输出结果。
My y_test values
Degree Nature
762721 1 7
548912 0 6
727126 1 12
14880 1 12
189505 1 12
657486 1 12
461004 1 0
31548 0 6
296674 1 7
121330 0 17
predicted output :
[[ 1. 7.]
[ 0. 6.]
[ 1. 12.]
[ 1. 12.]
[ 1. 12.]
[ 1. 12.]
[ 1. 0.]
[ 0. 6.]
[ 1. 7.]
[ 0. 17.]]
现在我想检查分类器的性能。我发现对于多类多标签,"汉明损失或杰卡德相似度得分"是一个好指标。我尝试计算它,但出现了值错误。
Error:
ValueError: multiclass-multioutput is not supported
我尝试了以下这行代码:
print hamming_loss(y_test, RF_predicted)
print jaccard_similarity_score(y_test, RF_predicted)
Thanks,