TreePruning {BESTree}R Documentation

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

nv <- 50
ValData <- BESTree::Data[(1000+1):nv,]
Fit <- BESTree::Fit
Fit[[1]] <- BESTree::TreePruning(Fit,ValData)

[Package BESTree version 0.5.2 Index]