summarize.tree: Useful summaries of partition models from rpart

Description Usage Arguments Details Author(s) References See Also Examples

Description

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

Usage

1

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.

Author(s)

Adam Petrie

References

Introduction to Regression and Modeling

See Also

rpart, randomForest

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
  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)
	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,ntrees=500)
	summarize.tree(RF)
	 

profpetrie/regclass documentation built on May 26, 2019, 8:33 a.m.