我在回归问题中使用 scikit-learn 中的 GradientBoostingRegressor
。论文中Gradient boosting machines, a tutorial ,在这部分:
3.2. Specifying the base-learners
A particular GBM can be designed with different base-learner models on board.
...
The commonly used base-learner models can be classified into three distinct categories: linear models, smooth models and decision trees.
他们指定了梯度提升的基础学习器,但在相关的 scikit-learn documentation 中,找不到可以指定它的参数。
scikit-learn GradientBoostingRegressor
中使用的基础学习器是什么?如果有办法指定基础学习器,我该怎么做?
最佳答案
仔细查看文档页面,您会看到 linked致(强调我的):
In each stage a regression tree is fit on the negative gradient of the given loss function.
所以这里的基本估计器是 decision tree regressor .
您无法在此处更改基本回归量;为此,您必须恢复到 AdaBoostRegressor
模型,与梯度提升模型有些相似但不完全相同。
请记住,虽然理论上您链接的论文是正确的,但实践中的提升算法主要与决策树一起用作基本估计器,这是有原因的。非常简单地(不是完整阐述的地方),决策树表现出固有的不稳定性,这使得它们的增强(和装袋)集成特别有用,这不适用于线性模型或支持向量机等算法。
关于python - sklearn 中梯度提升的基础学习器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/61536640/