grid search result max_features = 'sqrt' in random forest - how to understand I did a grid search at random forest params. the result of
print(randomforestreg.best_params_)

The result is =
{'max_depth': 28, 'n_estimators': 500 ',max_features': 'sqrt', 'min_samples_split': 2,  'min_samples_leaf': 1'}
The Random Forest documentation:
If “auto”, then max_features=sqrt(n_features).
If “sqrt”, then max_features=sqrt(n_features) (same as “auto”).
So 'sqrt' is like max_features=sqrt(n_features) --&gt; same as 'auto'.
--&gt; the number of features with which tree is build. I dont understand this. When I have 19 columns(features) and 100.000 rows, what is now the answer of the question; &quot;what is the best value for max_features?&quot;. Is it the squared value of n features = 19^2 = 361?
The way to understand Max features is &quot;Number of features allowed to make the best split while building the tree&quot;. The reason to use this hyperparameter is, if you allow all the features for each split you are going to end up exactly the same trees in the entire random forest which might not be useful. To overcome this we let the model select a fixed number of features randomly, in this case, the no of features allowed = Square root of total no of features in your dataset.
Hope this clears up !!