Calculate the RSS of a decision tree model.
rss(x, ...)
The Residuals Sums of Squares (RSS) for the models `rpart`, `gbm.step`, and `randomForest`.
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.
## Not run: ------------------------------------ # library(rpart) # # fit.rpart <- rpart(Kyphosis ~ Age + Number + Start, data = kyphosis) # # rss(fit.rpart) ## ---------------------------------------------