Applies ToRevolution Analytics

You need to pass the output from rxDTree() to rxPredict()(using 'type' = 'prob') to get the class probabilities for each observation in your dataset.Here is a quick example using the 'iris' dataset:

# classification iris.sub <- c(sample(1:50, 25), sample(51:100, 25), sample(101:150, 25)) iris.dtree <- rxDTree(Species ~ Sepal.Length + Sepal.Width + Petal.Length + Petal.Width, data = iris[iris.sub, ], cp = 0.01) iris.dtreerxPredict(iris.dtree, iris[-iris.sub, ], type = "prob")

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.