分类:
2010-05-05 11:08:36
tree(formula = formula(data), data = parent.frame(),> data(cpus, package="MASS")
weights, subset,
na.action = na.pass, control = tree.control(nobs, ...),
method = "recursive.partition",
split = c("deviance", "gini"),
model = NULL, x = FALSE, y = TRUE, wts = TRUE, ...)
library(MASS)
data(cpus)
cpus.ltr <- tree(log10(perf) ~ syct+mmin+mmax+cach+chmin+chmax, cpus)
cpus.ltr
summary(cpus.ltr)
plot(cpus.ltr); text(cpus.ltr)
data(iris)
ir.tr <- tree(Species ~., iris)
ir.tr
summary(ir.tr)