【发布时间】:2021-12-20 23:53:21
【问题描述】:
大家好,我面临这样的错误,我是新手,我不知道这是什么意思。我使用神经网络函数对 Titanic 数据集进行分类
有什么建议吗??
str(Prediksi)
num [1:143] 0.393 0.393 0.393 0.393 0.393 ...
str(测试)
num [1:143, 1:10] 1 1 1 1 1 1 1 1 1 1 ...
- attr(*, "dimnames")=List of 2
..$ : chr [1:143] "1" "3" "9" "15" ...
..$ : chr [1:10] "(Intercept)" "Survived" "Pclass" "Sexmale" ...
confusionMatrix(Prediksi,test)
Error: `data` and `reference` should be factors with the same levels.
【问题讨论】:
-
您的测试集的边缘集可能与您的训练集不同。
标签: r