Skip to contents

Growth delegated to morie_geron_cart_algorithm/morie_geron_predict_tree.

Usage

morie_geron_tree_high_variance(
  X,
  y,
  n_resamples = 20,
  seed = 0,
  criterion = "gini",
  max_depth = NULL
)

Arguments

X, y

Data.

n_resamples

Bootstrap count (>=2).

seed

LCG seed.

criterion, max_depth

CART controls.

Value

List with variance, bias2, root_splits, structural_instability, ensemble_prediction.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
morie_geron_tree_high_variance(V, V)
#> $variance
#> [1] 0.375
#> 
#> $bias2
#> [1] 0.125
#> 
#> $per_point_variance
#> [1] 0.50 0.25 0.35 0.20 0.25 0.60 0.40 0.45
#> 
#> $root_splits
#> $root_splits[[1]]
#> [1] 0.0 3.5
#> 
#> $root_splits[[2]]
#> [1] 0.0 5.5
#> 
#> $root_splits[[3]]
#> [1] 0.0 5.5
#> 
#> $root_splits[[4]]
#> [1] 0.0 1.5
#> 
#> $root_splits[[5]]
#> [1] 0 7
#> 
#> $root_splits[[6]]
#> [1] 0.0 1.5
#> 
#> $root_splits[[7]]
#> [1] 0.0 2.5
#> 
#> $root_splits[[8]]
#> [1] 0 3
#> 
#> $root_splits[[9]]
#> [1] 0.0 2.5
#> 
#> $root_splits[[10]]
#> [1] 0 6
#> 
#> $root_splits[[11]]
#> [1] 0.0 4.5
#> 
#> $root_splits[[12]]
#> [1] 0 4
#> 
#> $root_splits[[13]]
#> [1] 0.0 4.5
#> 
#> $root_splits[[14]]
#> [1] 0.0 7.5
#> 
#> $root_splits[[15]]
#> [1] 0 3
#> 
#> $root_splits[[16]]
#> [1] 0.0 6.5
#> 
#> $root_splits[[17]]
#> [1] 0.0 2.5
#> 
#> $root_splits[[18]]
#> [1] 0.0 6.5
#> 
#> $root_splits[[19]]
#> [1] 0.0 3.5
#> 
#> $root_splits[[20]]
#> [1] 0 2
#> 
#> 
#> $reference_root
#> [1] 0.0 1.5
#> 
#> $structural_instability
#> [1] 0.9
#> 
#> $ensemble_prediction
#> [1] 1 2 3 4 5 5 7 8
#> 
#> $ensemble_score
#> [1] 0.875
#> 
#> $single_tree_score
#> [1] 1
#> 
#> $n_resamples
#> [1] 20
#> 
#> $criterion
#> [1] "gini"
#> 
#> $estimate
#> [1] 0.375
#> 
#> $n
#> [1] 8
#> 
#> $method
#> [1] "bootstrap resampling of CART trees to measure prediction variance and root instability"
#>