首页 > 代码库 > 损失函数

损失函数

1 Square loss
    技术分享
 
2 Hinge loss
技术分享
 
3 Logistic loss
技术分享
 
4 Cross entropy loss
   Using the alternative label convention技术分享,so that技术分享,
    the cross entropy loss is defined as
      技术分享
 
  1. x = np.linspace(-3, 3, 1000)
  2. y_logit = np.log(1 + np.exp(-x)) / math.log(2)
  3. y_01 = x < 0
  4. y_hinge = 1 - x
  5. y_hinge[y_hinge < 0] = 0


技术分享
 


来自为知笔记(Wiz)


损失函数