In the RandomForestClassifier
function in sklearn.ensemble
, one of the parameters is max_features
, which controls the size of the random subset of features that are considered at each node splitting. I would think this needs to be an integer, since of course the size of a subset needs to be an integer.
But one of the options here is "log2"
, which sets max_features
to log_2(n_features)
.
I was wondering how that works, considering log_2(n_features)
will not be an integer unless n_features
is a power of 2.
Thanks.