tree predictions weeoe

Hello, I have done a tree in r using this command "cstree <- tree(Sales~., Carseats, subset=train)", it is working well but when I try to use the predict command like this " cstree.pred <- predict(cstree, test, type ="class")" I get this error message " Error in predict.tree(cstree, test, type = "class") : type "class" only for classification trees"
What am I doing wrong?

The default is type = "vector", maybe try that.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.