了解confussionMatrix()我试过这个
library(caret)
dataset1 = data.frame(forecast=c(4671397.7147,4602397.5887,4756124.2292,4754702.5180,4811885.2432,4886686.7732))
dataset2 = data.frame(PaidAmount= c(3377420.5946,3304701.4007,4197240.7709,3202655.9895,3332027.0383,3850655.8740))
result = confusionMatrix(dataset1$forecast,dataset2$PaidAmount)
print(result)
但我收到错误
Error : the data and reference values must have exactly the same levels
我该如何解决这个问题?