多标签分类:准确性预测中的错误

时间:2019-09-10 05:55:12

标签: python-3.x multilabel-classification

我是多标签分类的新手,并且使用二进制相关性作为分类器。 ML模型可以正常工作,但是当我尝试获取准确性指标时:汉明损失,准确性得分,我将得到以下错误:

in _check_targets(y_true, y_pred)
     79     if len(y_type) > 1:
     80     raise ValueError("Classification metrics can't handle a 
            mix of {0} "
    ---> 81  "and {1} targets".format(type_true, 
   type_pred))
     82 
     83     # We can't have more than one value on y_type => The set is no 
          more needed

            ValueError: Classification metrics can't handle a mix of 
             binary and multilabel-indicator targets

我也确实提出了一个问题 https://datascience.stackexchange.com/questions/58912/binaryrelevence-classifier-giving-errors-during-predicting-accuracy-scores

有人可以告诉我为什么会弹出此错误,以及解决此问题的方法。

0 个答案:

没有答案