Skip to contents

The leaf value is the mean of its targets, the squared-error minimiser.

Usage

morie_geron_tree_regression_leaf(y, leaf_mask = NULL)

Arguments

y

Numeric targets over the node set.

leaf_mask

Optional logical selector.

Value

List with prediction, mse, std, n_leaf.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_tree_regression_leaf(V)
#> $prediction
#> [1] 4.5
#> 
#> $mse
#> [1] 5.25
#> 
#> $std
#> [1] 2.291288
#> 
#> $n_leaf
#> [1] 8
#> 
#> $estimate
#> [1] 4.5
#> 
#> $n
#> [1] 8
#>