# Random Forest

![Source: TIBCO](/files/-LwB8NgwITY4LMRiQ0Sp)

Random forests are an ensemble learning technique that combines multiple **decision trees** into a forest or final model of decision trees that ultimately produces more accurate and stable predictions. &#x20;

Random forests operate on the principle that a large number of trees operating as a committee (forming a strong learner) will outperform a single constituent tree (a weak learner).  This is akin to the requirement in statistics to have a sample size large enough to be statistically relevant. Some individual trees may be wrong but as long as the individual trees are not making completely random predictions, their aggregate will form an approximation of the underlying data.

![Source: CitizenNet](/files/-LwBDkxf97yNSDh99KuN)

**Bagging** is the algorithmic technique used in the random forest scenario. This, we may recall, differs from the [Gradient Boosting](/wiki/gradient-boosting.md) technique. Bagging trains individual decision trees on random samples of subsets of the dataset to reduce correlation.  A benefit of bagging over boosting is that bagging can be performed in parallel while boosting is a sequential operation.

Individual decision trees are prone to [overfitting](/wiki/overfitting-vs-underfitting.md) and have a tendency to learn the noise in the dataset.  Random Forests take an average of multiple trees -- so as long as the individual decision trees are not correlated, this strategy reduces overfitting and sensitivity to noise in the dataset. &#x20;


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://machine-learning.paperspace.com/wiki/random-forest.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
