summarize_tree function

Useful summaries of partition models from rpart

Useful summaries of partition models from rpart

Reports the RMSE, AIC, and variable importances for a partition model or the variable importances from a random forest.

summarize_tree(TREE)

Arguments

  • TREE: A partition model created with rpart or a random forest from randomForest

Details

Extracts the RMSE and AIC of a partition model and the variable importances of partition models or random forests.

References

Introduction to Regression and Modeling

Author(s)

Adam Petrie

See Also

rpart, randomForest

Examples

data(WINE) TREE <- rpart(Quality~.,data=WINE,control=rpart.control(cp=0.01,xval=10,minbucket=5)) summarize_tree(TREE) RF <- randomForest(Quality~.,data=WINE,ntree=50) summarize_tree(RF) data(NFL) TREE <- rpart(X4.Wins~.,data=NFL,control=rpart.control(cp=0.002,xval=10,minbucket=5)) summarize_tree(TREE) RF <- randomForest(X4.Wins~.,data=NFL,ntree=50) summarize_tree(RF)
  • Maintainer: Adam Petrie
  • License: GPL (>= 2)
  • Last published: 2020-02-21

Useful links