https://www.cnblogs.com/sylz/p/6858544.html?utm_source=itdadao&utm_medium=referral
2017-12-19 14:27
531 查看
Bagging Classifier+Regressor
from sklearn.ensemble import BaggingRegressor
Bagging通过引入随机化增大每个估计器之间的差异。
参数介绍:
base_estimator:Object or None。None代表默认是DecisionTree,Object可以指定基估计器(base estimator)。
n_estimators:int, optional (default=10) 。 要集成的基估计器的个数。
max_samples: int or float, optional (default=1.0)。决定从x_train抽取去训练基估计器的样本数量。int 代表抽取数量,float代表抽取比例
max_features : int or float, optional (default=1.0)。决定从x_train抽取去训练基估计器的特征数量。int 代表抽取数量,float代表抽取比例
bootstrap : boolean, optional (default=True) 决定样本子集的抽样方式(有放回和不放回)
bootstrap_features : boolean, optional (default=False)决定特征子集的抽样方式(有放回和不放回)
oob_score : bool 决定是否使用包外估计(out of bag estimate)泛化误差
warm_start : bool, optional (default=False) true代表
n_jobs : int, optional (default=1)
random_state : int, RandomState instance or None, optional (default=None)。如果int,random_state是随机数生成器使用的种子; 如果RandomState的实例,random_state是随机数生成器; 如果None,则随机数生成器是由np.random使用的RandomState实例。
verbose : int, optional (default=0)
属性介绍:
estimators_ : list of estimators。The collection of fitted sub-estimators.
estimators_samples_ : list of arrays
estimators_features_ : list of arrays
oob_score_ : float,使用包外估计这个训练数据集的得分。
oob_prediction_ : array of shape = [n_samples]。在训练集上用out-of-bag估计计算的预测。 如果n_estimator很小,则可能在抽样过程中数据点不会被忽略。 在这种情况下,oob_prediction_可能包含NaN。
还要解决三个问题
①他到底是什么,用于什么情况?
BaggingRegressor就是一个Bagging的回归器组合。说到底还是用于集成多个回归器,所以还是会勇于回归预测的情况,集成一下解决过拟合的问题。
②他的优缺点?
③调参过程?
from sklearn.ensemble import BaggingRegressor
Bagging通过引入随机化增大每个估计器之间的差异。
参数介绍:
base_estimator:Object or None。None代表默认是DecisionTree,Object可以指定基估计器(base estimator)。
n_estimators:int, optional (default=10) 。 要集成的基估计器的个数。
max_samples: int or float, optional (default=1.0)。决定从x_train抽取去训练基估计器的样本数量。int 代表抽取数量,float代表抽取比例
max_features : int or float, optional (default=1.0)。决定从x_train抽取去训练基估计器的特征数量。int 代表抽取数量,float代表抽取比例
bootstrap : boolean, optional (default=True) 决定样本子集的抽样方式(有放回和不放回)
bootstrap_features : boolean, optional (default=False)决定特征子集的抽样方式(有放回和不放回)
oob_score : bool 决定是否使用包外估计(out of bag estimate)泛化误差
warm_start : bool, optional (default=False) true代表
n_jobs : int, optional (default=1)
random_state : int, RandomState instance or None, optional (default=None)。如果int,random_state是随机数生成器使用的种子; 如果RandomState的实例,random_state是随机数生成器; 如果None,则随机数生成器是由np.random使用的RandomState实例。
verbose : int, optional (default=0)
属性介绍:
estimators_ : list of estimators。The collection of fitted sub-estimators.
estimators_samples_ : list of arrays
estimators_features_ : list of arrays
oob_score_ : float,使用包外估计这个训练数据集的得分。
oob_prediction_ : array of shape = [n_samples]。在训练集上用out-of-bag估计计算的预测。 如果n_estimator很小,则可能在抽样过程中数据点不会被忽略。 在这种情况下,oob_prediction_可能包含NaN。
还要解决三个问题
①他到底是什么,用于什么情况?
BaggingRegressor就是一个Bagging的回归器组合。说到底还是用于集成多个回归器,所以还是会勇于回归预测的情况,集成一下解决过拟合的问题。
②他的优缺点?
③调参过程?
相关文章推荐
- netty的工作流程https://www.cnblogs.com/chenyangyao/p/netty.html?utm_source=itdadao&utm_medium=referral
- https://www.cnblogs.com/wt645631686/p/6867651.html?utm_source=itdadao&utm_medium=referral
- http://www.cnblogs.com/dumuqiao/p/3654702.html?utm_source=tuicool&utm_medium=referral
- https://lanjingling.github.io/2016/02/15/spring-aop-dynamicdatasource/?utm_source=tuicool&utm_medium=referral
- https://www.nginx.com/blog/service-discovery-in-a-microservices-architecture/?utm_source=introduction-to-microservices&utm_medium=blog&utm_campaign=Microservices
- 红黑树(四)之 C++的实现 http://www.cnblogs.com/skywang12345/p/3624291.html?utm_source=tuicool&utm_medium=refe
- http://blog.csdn.net/a123demi/article/details/41021513?utm_source=tuicool&utm_medium=referral
- 汽车 http://www.chinawebinar.com/lobbyPage.do?eventId=100210&utm_source=CW&utm_medium=CW_eDM_1027&utm_
- https://www.toutiao.com/a6457425756212429325/?tt_from=mobile_qq&utm_campaign=client_share&app=news_a
- Source Insight v.s SlickEdit® 2007
- 使用第三方 'Could not find class 'net.htmlparser.jericho.Source' 错误修复 红色感叹号
- Atitit.html解析器的选型 jsoup nsoup ,java c# .net 版本号
- file_get_contents(): Unable to find the wrapper "https" - did you forget to enable it 的解决
- 超链接中 utm_source, utm_medium 等参数的含义是什么?
- robotframework安装和配置【转IBM:https://www.ibm.com/developerworks/cn/opensource/os-cn-robot-framework/index.html】
- android源码下载,curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo网络不可达
- 关于package 'Visual Web Developer HTML Source Editor Package' has failed to load
- html中转义字符的含义 > &It; 等
- https://sourceware.org/gdb/onlinedocs/gdb/Forks.html
- EF的泛型封装 写的很好 转自Fly_Elephant http://www.cnblogs.com/xiaofeixiang/p/4188600.html?utm_source=tuicool