hinge loss:
Given an example (xi,yi)(xi,yi), where the xixi is the image and where yiyi is the integer label.
and using the shorthand for the scores vector: s=f(xi,W)s=f(xi,W)
the SVM loss has the form:
Li=∑ j!=yimax(0,Sj−Syi+1)Li=∑ j!=yimax(0,Sj−Syi+1) ,其中SyiSyi代表正确分类的预测值
也就是说损失函数的定义,是想要正确分类的分数远比其他类别的分数高。
正则化:
L1 正则化:J(θ)=[yθ(x)−y]2+[|θ1|+|θ2|+...]J(θ)=[yθ(x)−y]2+[|θ1|+|θ2|+...]
L2 正则化:J(θ)=[yθ(x)−y]2+[θ21+θ22+...]J(θ)=[yθ(x)−y]2+[θ12+θ22+...]
西瓜书252-253页有介绍,L1范数有利于得到稀疏解,求到的权值会有更少的非零分量。
softmax loss:
多项逻辑回归损失