Skip to content

Instantly share code, notes, and snippets.

@BenHeubl
Created February 13, 2020 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BenHeubl/b73bca173442fc6e1dd929961aca9fc3 to your computer and use it in GitHub Desktop.
Save BenHeubl/b73bca173442fc6e1dd929961aca9fc3 to your computer and use it in GitHub Desktop.
tut21
model_random_forrest_optimal <- randomForest(INCOME ~ .,
data = TrainSet,
ntree = 500, mtry = 3,
importance = TRUE)
model_decision_RF = predict(model_random_forrest_optimal, data = TrainSet)
table(model_decision_RF, TrainSet$INCOME)
mean(model_decision_RF == TrainSet$INCOME)
#[1] 0.7757143
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment