# Random Forests

A random forest trains many decision trees, each on a bootstrap sample of the training rows and choosing among a random few features at each split, then averages their predicted probabilities, so it changes less with the rows it was given than one tree does; RandomForestClassifier(n_estimators=200, random_state=0) builds one, it's harder to read than a single tree, and gradient boosting is the next model to learn.

![Cheat sheet: Random Forests](https://fsdtrainingmedia.blob.core.windows.net/public/images/2026/11/b32ba358bd9a4e118e2ac1a5caafa929.webp)

- Category: Machine Learning
- Level: Journeyman
- Tags: ai, Bootstrap Sample, Decision Tree, Ensemble Learning, Gradient Boosting, python, Random Forest
- Author: Gregor Dzierzon
- Updated: November 23, 2026

Source: https://www.ask-codey.com/cheat-sheets/ml-random-forests-cheat-sheet
