“损耗参数说明”sklearn.Ensement.GradientBoostingClassifier"

2024-10-03 23:17:44 发布

您现在位置:Python中文网/ 问答频道 /正文

使用梯度Boosting学习梯度Boosting模型[sklearn.Ensement.GradientBoostingClassifier]当我遇到“loss”参数时。在

sklearn的官方解释是-

loss : {‘deviance’, ‘exponential’}, optional (default=’deviance’)

loss function to be optimized. ‘deviance’ refers to deviance (= logistic regression) for classification with probabilistic outputs. For loss ‘exponential’ gradient boosting recovers the AdaBoost algorithm.

sklearn.ensemble.GradientBoostingClassifier

我的问题是,根据我有限的理解,“偏差”损失函数用于概率分类(就像naivebayes用于分类的概率输出)。在

指数损失函数会发生什么? 或者 何时应使用“指数”损失函数

根据sklearn.Ensement.AdaBoostClassifier第sklearn.ensemble.AdaBoostClassifier

对于“algorithm”参数-

algorithm : {‘SAMME’, ‘SAMME.R’}, optional (default=’SAMME.R’)

If ‘SAMME.R’ then use the SAMME.R real boosting algorithm. base_estimator must support calculation of class probabilities. If ‘SAMME’ then use the SAMME discrete boosting algorithm. The SAMME.R algorithm typically converges faster than SAMME, achieving a lower test error with fewer boosting iterations.

这意味着AdaBoost的SAMME.R与gradientboosting分类器的“loss”参数的“偏差”类似?在

我的理解是正确的还是我遗漏了什么。在

谢谢!在


Tags: the函数参数sklearnalgorithm梯度损失loss