View source: R/summarize_tree.R
summarize_tree | R Documentation |
Reports the RMSE, AIC, and variable importances for a partition model or the variable importances from a random forest.
summarize_tree(TREE)
TREE |
A partition model created with |
Extracts the RMSE and AIC of a partition model and the variable importances of partition models or random forests.
Adam Petrie
Introduction to Regression and Modeling
rpart
, randomForest
data(WINE)
set.seed(2025); SUBSET <- WINE[sample(1:nrow(WINE),size=500),]
TREE <- rpart(Quality~.,data=SUBSET,control=rpart.control(cp=0.01,xval=10,minbucket=5))
summarize_tree(TREE)
RF <- randomForest(Quality~.,data=SUBSET,ntrees=50)
summarize_tree(RF)
data(NFL)
SUBSET <- NFL[,1:10]
TREE <- rpart(X4.Wins~.,data=SUBSET,control=rpart.control(cp=0.002,xval=10,minbucket=5))
summarize_tree(TREE)
RF <- randomForest(X4.Wins~.,data=SUBSET,ntrees=50)
summarize_tree(RF)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.