Each tree trains on a random sample of the data (with replacement). This creates diversity among trees!
Each split considers only a random subset of features. This prevents trees from all making the same mistakes.
For classification: majority vote wins. For regression: average all predictions. Democracy of trees!
Many weak learners become one strong learner. Individual trees may overfit, but the ensemble stays robust!
n_estimators โ Number of trees in the forest (more trees = more stable)max_features โ Number of features to consider at each splitmax_depth โ Maximum depth of each tree (controls overfitting)