- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我一直在尝试了解 Lightgbm Handless L1 是如何丢失的(MAE、MAPE、HUBER)
根据to this article ,分割期间的增益应仅取决于损失函数的一阶和二阶导数。这是因为 Lightgbm 使用损失函数的二阶近似,因此我们可以将损失近似如下
然而,对于 L1 损失,损失梯度的绝对值是恒定的,其粗麻布为 0。我也读过这篇文章来处理这个问题,for loss functions with hessian = 0 we should rather use 1 as the Hessian :
"For these objective function with first_order_gradient is constant, LightGBM has a special treatment for them: (...) it will use the constant gradient for the tree structure learning, but use the residual for the leaf output calculation, with percentile function, e.g. 50% for MAE. This solution is from sklearn, and is proven to work in many benchmarks."
但是,即使使用常量粗麻布对我来说也没有意义:例如,如果使用 MAE 时梯度是误差的符号,则平方梯度不会为我们提供信息。这是否意味着当梯度恒定时,LightGbm不使用二阶近似,而默认使用传统的梯度提升?
另一方面,当阅读有关 GOSS boosting 原版 lightgbm paper 的内容时
对于 GOSS boosting 策略,作者考虑了梯度总和的平方。我看到了与上面相同的问题:如果 MAE 的梯度是误差的符号,那么梯度的平方如何反射(reflect)增益?这是否意味着 GOSS 也不适用于具有恒定梯度的损失函数?
提前致谢,
最佳答案
我在 Lightgbm 存储库中询问了这个问题并得到了这个 answer :
Before this version, we use the second-order approximation, but its performance actually is not good. And we switch back to 1) use first-order gradient to find split point; 2) then use the median of residuals for leaf outputs, as shown in the above code.
看来 Lightgbm 将使用梯度下降来处理已经实现的 L1 损失。对于自定义损失函数,它仍然会尝试执行大约二阶操作。
关于machine-learning - Lightgbm(或其他具有损失的二阶近似值的增强树实现)如何处理 L1 损失?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60137453/
我想近似 前 功能。 是否可以使用基于多个样条类型的方法来做到这一点?即在 之间x1 和 x2 , 然后 y1 = a1x + b1, between x2 and x3, 那么 y2 = a2x +
我正在尝试使用 selenium IDE,并且遇到了断言近似值的问题。我需要检查带有 id 的元素内的值。它是以逗号(“,”)作为分隔符的数值。 问题是我需要检查数值是否有效,容差为 0.01。 例如
我正在寻找一种算法(最好是在 Go 或 C 中)以在可能的分母(dmin,dmax with 1 dmax: break 有些软件,例如 Microsoft Excel,会使用分数
我想尝试寻找解决旅行商问题的启发式/近似方法,为了做到这一点,我正在寻找一些“硬”TSP 实例(连同它们最著名的解决方案),以便我可以尝试解决它们,看看我能做多好。 理想情况下,它们只是基于文本的邻接
我想要一个 VBA 查看单元格并使用 % 确定单词 XXX 是否出现在其中的任何位置。如果是,我希望 VBA 将整个单元格更改为单词 YYY。 谁能帮我解决这个问题? 最佳答案 如果您只需要更改 1
我有最后一组图 block ,其中每条边都可以有四种颜色。 任务是从这个瓷砖的给定集合(有限)中找到最大可能的正方形构建。瓷砖可以旋转。 我需要设计 3 种算法来为这个任务找到解决方案。一个完全和两个
我正在使用该系列近似 PI: 该系列的函数如下所示: (defn- pi-series [k] (/ (if (even? (inc k)) 1 -1) (dec (* 2 k))))
基本上,我一直在尝试制作两个近似函数。在这两种情况下,我都输入了“x”和“y”组件(以处理那些讨厌的 n/0 和 0/0 条件),并且需要获得 Signed Char 输出。在 ATAN2 的情况下,
我正在尝试用 C 编写 pi 的准蒙特卡洛近似值。我还不太精通它,并且正在尝试翻译我基于 python 的技能,所以我可能只是忽略了一些东西。结果我一直得到 0,我不知道为什么。我应该如何解决这个问题
我正在尝试在尾数中以 11 位精度实现快速 atan2(float)。 atan2 实现将用于图像处理。 所以最好用 SIMD 指令来实现(目标是 x86(带 SSE2)和 ARM(带 vpfv4 N
我是一名优秀的程序员,十分优秀!