BESTree (version 0.5.2)

TreePruning: Uses a Validation Set to select the best trees within the list of pruned trees.

Description

Uses a Validation Set to select the best trees within the list of pruned trees.

Usage

TreePruning(Fit, VSet)

Arguments

Fit

A BEST object

VSet

A Validation Set (Can also be used in CV loop)

Value

The shallower trees among trees wiht Highest accuracy. This replaces the first element in the BEST object list.

Examples

Run this code
# NOT RUN {
nv <- 50
ValData <- BESTree::Data[(1000+1):nv,]
Fit <- BESTree::Fit
Fit[[1]] <- BESTree::TreePruning(Fit,ValData)
# }

Run the code above in your browser using DataLab