首页 > 其他 > 详细

机器学习知识点查漏补缺(随机森林和extraTrees)

时间:2018-04-01 15:55:29      阅读:280      评论:0      收藏:0      [点我收藏+]
随机森林
对数据样本及特征随机抽取,进行多个决策树训练,防止过拟合,提高泛化能力
 
一般随机森林的特点:
1、有放回抽样(所以生成每棵树的时候,实际数据集会有重复),
2、以最优划分分裂
Given a standard training set D of size n, bagging generates m new training sets D_i, each of size n′, by sampling from D uniformly and with replacement. This kind of sample is known as a bootstrap sample. The m models are fitted using the above m bootstrap samples and combined by averaging the output (for regression) or voting (for classification).
 
ExtraTrees算法多一层随机性,在对连续变量特征选取最优分裂值时,不会计算所有分裂值的效果,来选择分裂特征。
而是对每一个特征,在它的特征取值范围内,随机生成一个split value,再计算看选取哪一个特征来进行分裂。
1、Empirical good default values are max_features=n_features for regression problems, and max_features=sqrt(n_features) for classification tasks (where n_features is the number of features in the data). 
2、In addition, note that in random forests, bootstrap samples are used by default (bootstrap=True) while the default strategy for extra-trees is to use the whole dataset (bootstrap=False). 

机器学习知识点查漏补缺(随机森林和extraTrees)

原文:https://www.cnblogs.com/hugh-tan/p/8686701.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!