![]() Here's some of my data so you can see What I'm working with: > head(data) ![]() ![]() I've tried the debug and traceback but I'm not understanding why this error is occurring (and like I said, it's not reproducible with iris data). Which I think comes from this line: error.rate = sum(test$Class != predict(tree, test, type="c")) / nrow(test) I'm getting the error: Error in predict.rpart(tree, test, type = "c") : My data has 37 predictor variables (both numerical and categorical) with the 38th column the Class prediction. ![]() It works just fine on the iris dataset, but does not work on my ow ndata. I am using the exact code for best first search from page 4 of this CRAN document ( ), which uses the iris dataset.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |