标签:
x = np.linspace(-3, 3, 1000)y_logit = np.log(1 + np.exp(-x)) / math.log(2)y_01 = x < 0y_hinge = 1 - xy_hinge[y_hinge < 0] = 0
x = np.linspace(-3, 3, 1000)
y_logit = np.log(1 + np.exp(-x)) / math.log(2)
y_01 = x < 0
y_hinge = 1 - x
y_hinge[y_hinge < 0] = 0
损失函数
原文地址:http://www.cnblogs.com/iathena/p/adff097f87efcb087139ca5948015f93.html