tests/cv.tree.R

library(tree)
set.seed(4)
foo <- data.frame(x=rnorm(100), y=rnorm(100))
my_tree <- tree(y ~ x, data = foo)
cv.tree(my_tree, k = 1:40)

Try the tree package in your browser

Any scripts or data that you put into this service are public.

tree documentation built on Feb. 16, 2023, 10:10 p.m.