machine learning - Trying to compute misclassifiction error for bagging classifier in R, getting error message -
i'm trying compute misclassification error on data bagging classifier. i've done 2 other sets of data doing way:
mydata.bagging <- bagging(v5~., data=mydata, mfinal=10) mydata.bagging.pred <- predict.bagging(mydata.bagging,newdata=mydata) mydata.bagging.pred$confusion mydata.bagging.pred$error
and it's worked fine. however, when try same thing third data, error message says
#error in cbind(yval2, yprob, nodeprob) : number of rows of matrices must match (see arg 2)
i'm assuming because third data has fewer rows other 2, how able fix problem , find misclassification error?
after removing 'na', problem has gone. also, first column has index column.
Comments
Post a Comment