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 BaggingClassifier

最新文章

  1. [资料搜集狂]D3.js数据可视化开发库
  2. Windows 远程停止iis服务
  3. javascript中的cookie,以及事件解析
  4. 【转】morgan stanley 电面面经新鲜出炉
  5. curl返回值写入内存的场景
  6. akoj-1073- Let the Balloon Rise
  7. vue.js基础知识篇(1):简介、数据绑定
  8. P1045
  9. 小白月赛13 小A的路径 (矩阵快速幂求距离为k的路径数)
  10. UVA 1152 4 Values whose Sum is 0 (枚举+中途相遇法)(+Java版)(Java手撕快排+二分)
  11. Docker(四)Dockerfile入门
  12. Mybatis(二) 全局配置文件详解
  13. linux signal
  14. AJAX从入门到放弃(一)
  15. [No0000108]Git1/9-Git简介与入门
  16. contos mysql 删除
  17. vue-11-自定义指令
  18. VCL界面控件DevExpress VCL Controls发布v18.2.4|附下载
  19. SpringBoot配置文件application.properties详解
  20. BZOJ4766:文艺计算姬(矩阵树定理)

热门文章

  1. Django的RestfulAPI框架RestFramework
  2. Microsoft Office Enterprise 2007 在安装过程中出错的解决方法
  3. 【CF724F】Uniformly Branched Trees 动态规划
  4. iOS的socket开发基础
  5. js的mime类型有哪些?
  6. dubbo入门之微服务客户端服务端配置
  7. python类中的self参数和cls参数
  8. sublime text 3 常见问题总结 pyv8
  9. Saltstack之api
  10. 把本地项目文件上传到github远程仓库的教程