diff --git a/Prediction/1. tree.r b/Prediction/1. tree.r new file mode 100644 index 0000000..1e3903b --- /dev/null +++ b/Prediction/1. tree.r @@ -0,0 +1,9 @@ +install.packages("rpart") +library(rpart) +#x11() +formula = Species~. +iris.df=rpart(formula, data=iris) +iris.df +plot(iris.df) +text(iris.df, use.n=T, cex=0.7) +post(iris.df) \ No newline at end of file