Guest User

Untitled

a guest
Dec 16th, 2017
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. ######################
  2. # Random Forest Model
  3. #######################
  4. library(randomForest)
  5. # Create a Model
  6. set.seed(110)
  7. titanic_train <- titanic_clean[1:891,]
  8. titanic_test <- titanic_clean[892:1309,]
  9.  
  10. titanic.rf <- randomForest(Survived ~
  11. Pclass+Sex+Age+SibSp+Parch+Embarked,
  12. data = titanic_train,
  13. importance=TRUE,
  14. proximity = TRUE,
  15. ntree=500)
  16. titanic.rf
  17. plot(titanic.rf)
  18. summary(titanic.rf)
  19. varImpPlot(titanic.rf)
Add Comment
Please, Sign In to add comment