In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article shows you what random forest means in R language classification algorithm. The content is concise and easy to understand. It can definitely make your eyes shine. I hope you can gain something through the detailed introduction of this article.
1. Principle analysis:
Random forest is a method of bootstrap resampling. k samples are repeatedly sampled from the original training sample set N to generate a new training sample set. Then k decision trees are generated according to the bootstrap sample set. The classification result of new data depends on the score formed by the number of votes of decision trees.
The popular understanding is a forest composed of many decision trees, and each sample needs to predict through each tree, and then according to the prediction results of all decision trees to determine the prediction results of the whole random forest. Every decision tree in random forest is binary tree, and its generation follows the top-down recursive splitting principle, that is, the training set is divided from root node in turn. In binary tree, the root node contains all training data, and according to the principle of minimum impurity, it splits into left node and right node, which contain a subset of training data respectively. According to the same rule, the node continues to split until it satisfies the branch stopping rule and stops growing.
1. Let N denote the number of samples in the original training set and M denote the number of variables.
2. Second, we need to determine a constant value m, which is used to determine how many variables are used when making decisions at a node.m
fit_rf=randomForest(Species~., data=data_train,mtry=4,importance=TRUE,ntree=1000)fit_rf[1:length(fit_rf)]
2)mapping
That's what random forest means in R language classification algorithm. Have you learned any knowledge or skills? If you want to learn more skills or enrich your knowledge reserves, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.