rss: rss

Description Usage Arguments Value Note Examples

View source: R/rss.R

Description

Calculate the RSS of a decision tree model.

Usage

1
rss(x, ...)

Arguments

x

A fitted rpart, gbm, or randomForest model

...

extra arguments

Value

The Residuals Sums of Squares (RSS) for the models 'rpart', 'gbm.step', and 'randomForest'.

Note

when using the 'caret' package, be sure to select 'model$finalModel' when entering it into the 'rss' function. Also note that the RSS only makes sense for continuous outcomes.

Examples

1
2
3
4
5
6
7
8
## Not run: 
library(rpart)

fit.rpart <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis)

rss(fit.rpart)

## End(Not run)

njtierney/treezy documentation built on Oct. 10, 2019, 1:08 a.m.