R/forest_helpers.R
pruneForest.Rd
Prunes each tree in the list forest$Trees according to the provided complexity parameter. Returns a new forest.
pruneForest(forest, cp)
forest | A model returned by splineForest() |
---|---|
cp | The complexity parameter that will be used to prune each tree (see rpart package documentation for detailed description of complexity parameter) |
A new splineforest object where each tree has been pruned to the desired level.
#> [1] 5.6 #> [1] 5.6#> [1] 5.6 #> [1] 5.6#> [1] 4.1 #> [1] 4.1