机器学习中 margin loss 、hinge loss 和 ramp loss 的区别

对分类问题,设 \(y\in\{-1, 1\}\), \(\mathop{sign}(f(x))\) 代表分类器, 定义 \(z = yf(x)\) 为 margin 值。
一般来说, margin loss function 代表只需输入 margin 值即可输出 loss 的 function. 也即 \(\ell: \mathbb R \to \mathbb R\) or \(\ell(y, f(x))\triangleq \ell(yf(x))\), 常见的 loss 都可写成 margin loss 的这种形式,例如:
\[ \begin{align*} \text{0-1 loss (PAC analysis)} \quad&1\{z\le 0\}\\ \text{logistic loss (Logistic Regression)} \quad&\log(1+\exp(-z))\\ \text{exponential loss (Boosting)} \quad&\exp(-z)\\ \text{hinge loss (SVM)} \quad&[1-z]_+\\ \text{square loss (Linear Regression)} \quad& (1-z)^2\\ \text{ramp loss (truncated at $s$)} \quad& [1-z]_+ - [s-z]_+ \end{align*} \]
以上参考:

  1. ICML-19 On Symmetric losses for learning from corrupted labels
  2. ICML-16 Loss Factorization, Weakly Supervised Learning and Label Noise Robustness
  3. 解析卷积神经网络---深度学习实践手册 p108
  4. 机器学习理论研究导引课程讲义(consistency)

但 ICML-19 Bridging Theory and Algorithm for Domain Adaptation中 特指 margin loss 为 如下 loss, 取代 0-1 loss
定义假设 \(f\)\((x,y)\) 处 margin 为: \(\rho_f(x,y) = \frac{1}{2}(f(x,y)-\max_{y'\neq y}f(x,y'))\)
再定义一个 \(\rho\)-间隔损失函数(机器学习理论研究导引讲义中基于 Rademacher 复杂度的 Boosting 间隔分析理论也提到此)如下:
\[ \Phi_\rho(x) \triangleq \begin{cases} 0 \quad&\rho\le x\\ 1-x/\rho \quad &0\le x\le\rho\\ 1 \quad &x\le 0 \end{cases} \]
\(\Phi_\rho(\rho_f(x,y))\)\(f\) 在样例 \((x,y)\) 处的 margin loss

猜你喜欢

转载自www.cnblogs.com/Gelthin2017/p/12163458.html