fbpx
维基百科

Hinge loss

機器學習中,鉸鏈損失是一個用於訓練分類器的損失函數。鉸鏈損失被用於「最大間格分類」,因此非常適合用於支持向量機 (SVM)。[1] 对于一个预期输出 ,分类结果 的鉸鏈損失定義為

t = 1 时变量 y(水平方向)的铰链损失(蓝色,垂直方向)与0/1损失(垂直方向;绿色为 y < 0 ,即分类错误)。注意铰接损失在 abs(y) < 1 时也会给出惩罚,对应于支持向量机中间隔的概念。

特別注意:以上式子的應該使用分類器的「原始輸出」,而非預測標籤。例如,在線性支持向量機當中,,其中 超平面参数,是輸入資料點。

同號(意即分類器的輸出是正確的分類),且 时,鉸鏈損失 。但是,當它們異號(意即分類器的輸出是错误的分類)時, 線性增長。套用相似的想法,如果 ,即使 同號(意即分類器的分類正確,但是間隔不足),此時仍然會有損失。

扩展 编辑

二元支持向量机经常通过一对多(winner-takes-all strategy,WTA SVM)或一对一(max-wins voting,MWV SVM)策略来扩展为多元分类[2] 铰接损失也可以做出类似的扩展,已有数个不同的多元分类铰接损失的变体被提出。[3] 例如,Crammer 和 Singer [4] 将一个多元线性分类的铰链损失定义为[5]

 

其中   为目的标签,    该模型的参数。

Weston 和 Watkins 提出了一个类似的定义,但使用求和代替了最大值:[6][3]

 

在结构预测中,铰接损失可以进一步扩展到结构化输出空间。支持间隔调整的结构化支持向量机 可以使用如下所示的铰链损失变体,其中 w 表示SVM的参数, y 为SVM的预测结果,φ 为联合特征函数,Δ汉明损失:

 

优化算法 编辑

铰链损失是一种凸函数,因此许多机器学习中常用的凸优化器均可用于优化铰链损失。 它不是可微函数,但拥有一个关于线性 SVM 模型参数 w次导数

 

其评分函数为  

 
三个铰链损失的变体 z = ty:“普通变体”(蓝色),平方变体(绿色),以及 Rennie 和 Srebro 提出的分段平滑变体(红色)。

然而,由于铰接损失在  处不可导, Zhang 建议在优化时可使用平滑的变体建议,[7] 如Rennie 和 Srebro 提出的分段平滑[8]

 

或平方平滑。

 

Modified Huber loss   时损失函数的特例,此时  中。

参考文献 编辑

  1. ^ Rosasco, L.; De Vito, E. D.; Caponnetto, A.; Piana, M.; Verri, A. Are Loss Functions All the Same? (PDF). Neural Computation. 2004, 16 (5): 1063–1076 [2019-06-04]. PMID 15070510. doi:10.1162/089976604773135104. (原始内容 (PDF)于2020-01-11). 
  2. ^ Duan, K. B.; Keerthi, S. S. Which Is the Best Multiclass SVM Method? An Empirical Study (PDF). Multiple Classifier Systems. LNCS 3541. 2005: 278–285 [2019-06-04]. ISBN 978-3-540-26306-7. doi:10.1007/11494683_28. (原始内容 (PDF)于2017-08-08). 
  3. ^ 3.0 3.1 Doğan, Ürün; Glasmachers, Tobias; Igel, Christian. A Unified View on Multi-class Support Vector Classification (PDF). Journal of Machine Learning Research. 2016, 17: 1–32 [2019-06-04]. (原始内容 (PDF)于2018-05-05).  引用错误:带有name属性“unifiedview”的<ref>标签用不同内容定义了多次
  4. ^ Crammer, Koby; Singer, Yoram. On the algorithmic implementation of multiclass kernel-based vector machines (PDF). Journal of Machine Learning Research. 2001, 2: 265–292 [2019-06-04]. (原始内容 (PDF)于2015-08-29). 
  5. ^ Moore, Robert C.; DeNero, John. L1 and L2 regularization for multiclass hinge loss models (PDF). Proc. Symp. on Machine Learning in Speech and Language Processing. 2011 [2019-06-04]. (原始内容 (PDF)于2017-08-28). 
  6. ^ Weston, Jason; Watkins, Chris. Support Vector Machines for Multi-Class Pattern Recognition (PDF). European Symposium on Artificial Neural Networks. 1999 [2019-06-04]. (原始内容 (PDF)于2018-05-05). 
  7. ^ Zhang, Tong. Solving large scale linear prediction problems using stochastic gradient descent algorithms (PDF). ICML. 2004 [2019-06-04]. (原始内容 (PDF)于2019-06-04). 
  8. ^ Rennie, Jason D. M.; Srebro, Nathan. Loss Functions for Preference Levels: Regression with Discrete Ordered Labels (PDF). Proc. IJCAI Multidisciplinary Workshop on Advances in Preference Handling. 2005 [2019-06-04]. (原始内容 (PDF)于2015-11-06). 

hinge, loss, 在機器學習中, 鉸鏈損失是一個用於訓練分類器的損失函數, 鉸鏈損失被用於, 最大間格分類, 因此非常適合用於支持向量機, 对于一个预期输出, displaystyle, 分类结果, displaystyle, 的鉸鏈損失定義為t, 时变量, 水平方向, 的铰链损失, 蓝色, 垂直方向, 与0, 1损失, 垂直方向, 绿色为, 即分类错误, 注意铰接损失在, 时也会给出惩罚, 对应于支持向量机中间隔的概念, displaystyle, cdot, 特別注意, 以上式子的y, displays. 在機器學習中 鉸鏈損失是一個用於訓練分類器的損失函數 鉸鏈損失被用於 最大間格分類 因此非常適合用於支持向量機 SVM 1 对于一个预期输出 t 1 displaystyle t pm 1 分类结果 y displaystyle y 的鉸鏈損失定義為t 1 时变量 y 水平方向 的铰链损失 蓝色 垂直方向 与0 1损失 垂直方向 绿色为 y lt 0 即分类错误 注意铰接损失在 abs y lt 1 时也会给出惩罚 对应于支持向量机中间隔的概念 ℓ y max 0 1 t y displaystyle ell y max 0 1 t cdot y 特別注意 以上式子的y displaystyle y 應該使用分類器的 原始輸出 而非預測標籤 例如 在線性支持向量機當中 y w x b displaystyle y mathbf w cdot mathbf x b 其中 w b displaystyle mathbf w b 是超平面参数 x displaystyle mathbf x 是輸入資料點 當t displaystyle t 和y displaystyle y 同號 意即分類器的輸出y displaystyle y 是正確的分類 且 y 1 displaystyle y geq 1 时 鉸鏈損失 ℓ y 0 displaystyle ell y 0 但是 當它們異號 意即分類器的輸出y displaystyle y 是错误的分類 時 ℓ y displaystyle ell y 隨 y displaystyle y 線性增長 套用相似的想法 如果 y lt 1 displaystyle y lt 1 即使 t displaystyle t 和 y displaystyle y 同號 意即分類器的分類正確 但是間隔不足 此時仍然會有損失 扩展 编辑二元支持向量机经常通过一对多 winner takes all strategy WTA SVM 或一对一 max wins voting MWV SVM 策略来扩展为多元分类 2 铰接损失也可以做出类似的扩展 已有数个不同的多元分类铰接损失的变体被提出 3 例如 Crammer 和 Singer 4 将一个多元线性分类的铰链损失定义为 5 ℓ y max 0 1 max y t w y x w t x displaystyle ell y max 0 1 max y neq t mathbf w y mathbf x mathbf w t mathbf x nbsp 其中 t displaystyle t nbsp 为目的标签 w t displaystyle mathbf w t nbsp 和 w y displaystyle mathbf w y nbsp 该模型的参数 Weston 和 Watkins 提出了一个类似的定义 但使用求和代替了最大值 6 3 ℓ y y t max 0 1 w y x w t x displaystyle ell y sum y neq t max 0 1 mathbf w y mathbf x mathbf w t mathbf x nbsp 在结构预测中 铰接损失可以进一步扩展到结构化输出空间 支持间隔调整的结构化支持向量机 可以使用如下所示的铰链损失变体 其中 w 表示SVM的参数 y 为SVM的预测结果 f 为联合特征函数 D 为汉明损失 ℓ y max 0 D y t w ϕ x y w ϕ x t max 0 max y Y D y t w ϕ x y w ϕ x t displaystyle begin aligned ell mathbf y amp max 0 Delta mathbf y mathbf t langle mathbf w phi mathbf x mathbf y rangle langle mathbf w phi mathbf x mathbf t rangle amp max 0 max y in mathcal Y left Delta mathbf y mathbf t langle mathbf w phi mathbf x mathbf y rangle right langle mathbf w phi mathbf x mathbf t rangle end aligned nbsp 优化算法 编辑铰链损失是一种凸函数 因此许多机器学习中常用的凸优化器均可用于优化铰链损失 它不是可微函数 但拥有一个关于线性 SVM 模型参数 w 的次导数 ℓ w i t x i if t y lt 1 0 otherwise displaystyle frac partial ell partial w i begin cases t cdot x i amp text if t cdot y lt 1 0 amp text otherwise end cases nbsp 其评分函数为 y w x displaystyle y mathbf w cdot mathbf x nbsp nbsp 三个铰链损失的变体 z ty 普通变体 蓝色 平方变体 绿色 以及 Rennie 和 Srebro 提出的分段平滑变体 红色 然而 由于铰接损失在 t y 1 displaystyle ty 1 nbsp 处不可导 Zhang 建议在优化时可使用平滑的变体建议 7 如Rennie 和 Srebro 提出的分段平滑 8 ℓ y 1 2 t y if t y 0 1 2 1 t y 2 if 0 lt t y 1 0 if 1 t y displaystyle ell y begin cases frac 1 2 ty amp text if ty leq 0 frac 1 2 1 ty 2 amp text if 0 lt ty leq 1 0 amp text if 1 leq ty end cases nbsp 或平方平滑 ℓ g y 1 2 g max 0 1 t y 2 if t y 1 g 1 g 2 t y otherwise displaystyle ell gamma y begin cases frac 1 2 gamma max 0 1 ty 2 amp text if ty geq 1 gamma 1 frac gamma 2 ty amp text otherwise end cases nbsp Modified Huber loss L displaystyle L nbsp 是g 2 displaystyle gamma 2 nbsp 时损失函数的特例 此时 L t y 4 ℓ 2 y displaystyle L t y 4 ell 2 y nbsp 中 参考文献 编辑 Rosasco L De Vito E D Caponnetto A Piana M Verri A Are Loss Functions All the Same PDF Neural Computation 2004 16 5 1063 1076 2019 06 04 PMID 15070510 doi 10 1162 089976604773135104 原始内容存档 PDF 于2020 01 11 Duan K B Keerthi S S Which Is the Best Multiclass SVM Method An Empirical Study PDF Multiple Classifier Systems LNCS 3541 2005 278 285 2019 06 04 ISBN 978 3 540 26306 7 doi 10 1007 11494683 28 原始内容存档 PDF 于2017 08 08 3 0 3 1 Dogan Urun Glasmachers Tobias Igel Christian A Unified View on Multi class Support Vector Classification PDF Journal of Machine Learning Research 2016 17 1 32 2019 06 04 原始内容存档 PDF 于2018 05 05 引用错误 带有name属性 unifiedview 的 lt ref gt 标签用不同内容定义了多次 Crammer Koby Singer Yoram On the algorithmic implementation of multiclass kernel based vector machines PDF Journal of Machine Learning Research 2001 2 265 292 2019 06 04 原始内容存档 PDF 于2015 08 29 Moore Robert C DeNero John L1 and L2 regularization for multiclass hinge loss models PDF Proc Symp on Machine Learning in Speech and Language Processing 2011 2019 06 04 原始内容存档 PDF 于2017 08 28 Weston Jason Watkins Chris Support Vector Machines for Multi Class Pattern Recognition PDF European Symposium on Artificial Neural Networks 1999 2019 06 04 原始内容存档 PDF 于2018 05 05 Zhang Tong Solving large scale linear prediction problems using stochastic gradient descent algorithms PDF ICML 2004 2019 06 04 原始内容存档 PDF 于2019 06 04 Rennie Jason D M Srebro Nathan Loss Functions for Preference Levels Regression with Discrete Ordered Labels PDF Proc IJCAI Multidisciplinary Workshop on Advances in Preference Handling 2005 2019 06 04 原始内容存档 PDF 于2015 11 06 取自 https zh wikipedia org w index php title Hinge loss amp oldid 62334576, 维基百科,wiki,书籍,书籍,图书馆,

文章

,阅读,下载,免费,免费下载,mp3,视频,mp4,3gp, jpg,jpeg,gif,png,图片,音乐,歌曲,电影,书籍,游戏,游戏。