PruneTreeGamma: PruneTreeGamma

Description Usage Arguments Details Value

View source: R/tree_utils.R

Description

Prune a bs_tree object for different values of tuning parameter gamma

Usage

1
PruneTreeGamma(x, gamma = seq(0, 3, length.out = 50))

Arguments

x

An object of class bs_tree

gamma

A numeric vector with values for gamma for which the tree shall be pruned.

Details

This functions adds the gamma penalty to each split in the tree. If the penalized loss is higher than the loss of the base segment the node will be pruned from the tree. The tree will be pruned for the specified path of gamma and for each gamma value a set of changepoints is returned.

Value

cpts

A list of lists with changepoints corresponding to a value of gamma each.

gamma

Gamma values.


lorenzha/hdcd documentation built on Sept. 2, 2018, 8:20 p.m.