# Random Forest

Random Forest is a bagging technique which uses n decision tress, and uses voting classifier to get the final results, with row sampling with replacement.

Reason to use RF over decision tree is decision tree with max depth gives a Low bias (Get well with training data) and High variance (bad results on the test set) model, using RF it makes the low variance.

With low Bias Decision tree model tend to achieve very low training error, because of splitting data into till max depth and high variance model get's very sensitive to small changes to the test set, leading to overfitting.

RF uses voting method for classification and Average methods for regression.


---

# 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://59r.gitbook.io/ml-university/machine-learning/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.
