recurse: Calculates the shattering coefficient for a decision tree.

Description Usage Arguments Value

View source: R/recurse.R

Description

Using a recursion, calculates the shattering coefficient for a rpart decision tree.

Usage

1
recurse(nodes, left, right, node, parent, samples, node_type, shattering, n_samples)

Arguments

nodes

list. A list containing the tree nodes.

left

int. The left child of the parent node.

right

int. The right child of the parent node.

node

int. The current node being analyzed

parent

int. The parent node of node.

samples

list. The number of dataset samples for each node of the tree.

node_type

string. The type of the node, e.g., leaf if it's a leaf node.

shattering

float. The shattering coefficient that are begin computed.

n_samples

int. The # of samples to consider in dataset.

Value

The calculus of the shattering coefficient.


shatteringdt documentation built on March 3, 2021, 9:05 a.m.