sklearn Bagging参数

文章来源:https://blog.csdn.net/genghaihua/article/details/81156228?utm_medium=distribute.pc_relevant_download.none-task-blog-baidujs-7.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-baidujs-7.nonecase

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。

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值