structure_ratio_prune: Tree structure ratio for prune.

View source: R/prune_ratio.R

structure_ratio_pruneR Documentation

Tree structure ratio for prune.

Description

Tree structure ratio of the candidate tree and the previous tree, given that the action step was a prune.

Usage

structure_ratio_prune(old_tree, tree, current_node, var_in_prune, p_split)

Arguments

old_tree

The previous tree

tree

The current tree

current_node

The current pruned node.

var_in_prune

The variable that was split in the node chosen to be pruned.

p_split

The number of available predictors

Details

For the tree structure ratio of the new pruned tree, we need to calculate an inversion of the tree structure ratio for the grow. We need the probabilities of: 1. Splitting at node n 2. Splitting at the node of the left 3. Splitting at the node of the right 4. Using each rule at node n

Value

The tree structure ratio

Author(s)

Bruna Wundervald, brunadaviesw@gmail.com.


brunaw/hebart documentation built on June 1, 2022, 8:35 p.m.