Statistics Glossary → mtry (variables tried per split)
mtry (variables tried per split)concept
In a random forest, the number of variables chosen at random as candidates at each split point of the trees.
A random forest grows many decision trees on bootstrap samples and combines their predictions. At each split, instead of all p variables, only mtry randomly chosen variables are tried and the best of these is used. This randomness stops a single strong variable from taking over the top of every tree, makes the trees differ from one another (reducing their correlation), and lowers the variance when they are averaged. Setting mtry = p turns the method into bagging.
Common defaults are √p for classification and p/3 for regression. A small mtry makes the trees more diverse but individually weaker; a large mtry makes them stronger but more alike. With many irrelevant variables, a small mtry raises the risk that no relevant variable is among the candidates at a split. The best value is often chosen with the out-of-bag (OOB) error or cross-validation, although random forests are usually not very sensitive to this parameter.
An everyday example
In a cooking contest, each of 100 judges assesses a dish by looking at only 3 randomly chosen criteria out of 12. Each judge's view is somewhat incomplete, but a dominant criterion such as 'presentation' cannot decide everyone's verdict, and the judges assess from different angles. The joint verdict of a hundred judges is far more reliable than that of any single judge. Here, mtry is the number of criteria each judge looks at.
In MerQur
It is set with the 'mtry (variables per split)' parameter in Random Forest; a value of 0 uses the default of √p for classification and max(1, floor(p/3)) for regression.