Question: Sub-problem 4: (15 points): effect of mtry Parameter mtry in the call to randomForest defines the number of predictors randomly chosen to be evaluated for
Sub-problem 4: (15 points): effect of mtry Parameter mtry in the call to randomForest defines the number of predictors randomly chosen to be evaluated for their association with the outcome at each split (please see help page for randomForest for more details). By default, for classification problems it is set as a square root of the number of predictors in the dataset. Here we will evaluate the impact of using different values of mtry on the error rate by random forest. Using the same approach as above, generate data with nObs=5000, deltaClass=2, nClassVars=3 and nNoiseVars=20 Run randomForest on those data with mtry=2, 5 and 10 and obtain corresponding test error for these three models. Describe the impact of using different values of mtry on the test error rate by random forest and compare it to that by LDA/KNN
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
