| cla_rpart | R Documentation |
Classification tree using rpart::rpart.
cla_rpart(attribute)
attribute |
target attribute name |
returns a cla_rpart object
Breiman, L., Friedman, J., Olshen, R. and Stone, C. (1984). Classification and Regression Trees. Wadsworth. Therneau, T. M. and Atkinson, E. J. (1997). An Introduction to Recursive Partitioning Using the rpart Routines.
if (requireNamespace("rpart", quietly = TRUE)) {
data(iris)
model <- cla_rpart("Species")
model <- fit(model, iris)
pred <- predict(model, iris)
eval <- evaluate(model, adjust_class_label(iris$Species), pred)
eval$metrics
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.