How does the max_samples parameter affect tree diversity in a Random Forest?
Last updated
max_samplessets how many rows go into each tree's bootstrap sample (only active when bootstrap=True). The default draws n rows with replacement, about 63.2% unique.Smaller samples mean less overlap between trees, so tree correlation ρ drops and the ensemble variance floor ρσ² falls. Each tree is weaker though (higher bias and variance).
Side benefits include faster training and more out-of-bag rows. Tune it with
max_featuresvia OOB score or CV.