gpt4 book ai didi

python - sklearn 中梯度提升的基础学习器

转载 作者:行者123 更新时间:2023-12-04 10:06:59 25 4
gpt4 key购买 nike

我用 GradientBoostingRegressor来自回归问题中的 scikit-learn。文中Gradient boosting machines, a tutorial ,在这部分:

3.2. Specifying the base-learners

A particular GBM can be designed with different base-learner models onboard.

...

The commonly used base-learner models can be classified into three distinct categories: linear models, smooth models and decisiontrees.


他们为梯度提升指定了基础学习器,但在相关的 scikit-learn documentation 中,我找不到可以指定它的参数。
scikit-learn 中使用的 base-learner 是什么 GradientBoostingRegressor ?如果有办法指定基础学习者,我该怎么做?

最佳答案

仔细查看文档页面,您有 linked到(强调我的):

In each stage a regression tree is fit on the negative gradient of the given loss function.



所以这里的基本估计量是 decision tree regressor .

您不能在此处更改基本回归量;为此,您必须恢复到 AdaBoostRegressor 模型,它与梯度提升模型有些相似但不完全相同。

请记住,虽然理论上您链接的论文是正确的,但实际上提升算法主要用于决策树作为基础估计器是有原因的。非常简单(不是完整阐述的地方),决策树表现出固有的不稳定性,这使得它们的增强(和装袋)集成特别有用,这对于诸如线性模型或 SVM 之类的算法不适用。

关于python - sklearn 中梯度提升的基础学习器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61536640/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com