Albeiro-Dev
10/24/2018 - 12:13 PM

r decision tree

#From the survived variable decide on Sex variable

library(rpart)
library(rattle)
library(rpart.plot)
library(RColorBrewer)
fit <- rpart(Survived ~ Sex, data=train, method="class")
fancyRpartPlot(fit)