We will use the randomForest() function to create the decision tree and see it's graph.
When we execute the above code, it produces the following result −
Call:
randomForest(formula = nativeSpeaker ~ age + shoeSize + score,
data = readingSkills)
Type of random forest: classification
Number of trees: 500
No. of variables tried at each split: 1
OOB estimate of error rate: 1%
Confusion matrix:
no yes class.error
no 99 1 0.01
yes 1 99 0.01
MeanDecreaseGini
age 13.95406
shoeSize 18.91006
score 56.73051
From the random forest shown above we can conclude that the shoesize and score are the important factors deciding if someone is a native speaker or not.
Also the model has only 1% error which means we can predict with 99% accuracy.
r random forest exampler random forest classification examplerandom forest r coder random forest regression examplerandom forest cross validation rrandom forest r code examplerandom forest regression rplot random forest rrandom forest tutorial rr random forest tutorialrandom forest treeonline random forestwhat is random forestrandom forest model in rrandom forest in r tutorialrandom forest algorithm in rrandom forest example rrandom forest regression in rrandom forest for classification in rhow to use random forest in rrandom forest code in rrandom forest regression r tutorialhow to interpret random forest results in rr code for random forestrandom forest examplerandom forest for dummiesplot random forest rr random forest cross validationbreiman’s random forest algorithmrandom forest analytics vidhyarandom forest packages in rrandom forest pdf