![随机森林分类算法](https://i-blog.csdnimg.cn/blog_migrate/da8fc9e47bdc9f67297d8c52f68fdbb1.png)
随机森林分类算法
分类算法-随机森林 (Classification Algorithms - Random Forest)
介绍 (Introduction)
Random forest is a supervised learning algorithm which is used for both classification as well as regression. But however, it is mainly used for classification problems. As we know that a forest is made up of trees and more trees means more robust forest. Similarly, random forest algorithm creates decision trees on data samples and then gets the prediction from each of them and finally selects the best solution by means of voting. It is an ensemble method which is better than a single decision tree because it reduces the over-fitting by averaging the result.
随机森林是一种监督学习算法,可用于分类和回归。 但是,它主要用于分类问题。 众所周知,森林由树木组成,更多的树木意味着更坚固的森林。 同样,随机森林算法在数据样本上创建决策树,然后从每个样本中获取预测,最后通过投票选择最佳解决方案。 它是一种集成方法,比单个决策树要好,因为它通过对结果求平均值来减少过度拟合。
随机森林算法的工作 (Working of Random Forest Algorithm)
We can understand the working of Random Forest algorithm with the help of following steps −
我们可以通过以下步骤来了解随机森林算法的工作原理-
Step 1 − First, start with the selection of random samples from a given dataset.
步骤1-首先,从给定的数据集中选择随机样本。
Step 2 − Next, this algorithm will construct a decision tree for every sample. Then it will get the prediction result from every decision tree.
步骤2-接下来,该算法将为每个样本构造一个决策树。 然后它将从每个决策树中获得