Abstract
- Define a loss function that quantifies our unhappiness with the scores across the training data.
- Come up with a way of efficiently finding the parameters that minimize the loss function.
(optimization)
1 Loss Function
- loss的一些想法
1.1 SVM的loss
该SVM Loss的一个特点
SVM Loss的形式
* 对例子计算Loss
平均Loss
这里有一个问题: What if the sum was over all classes?
其实是不会改变的,因为所有的值(j=i时)都+1所以相当于没有加还多做了操作
CODE例子:
另外一点需要注意的是:
奥卡姆剃刀原理:Among competing hypotheses,the simplest is the best(model选择的一点sense)
1.2 Regularization
1.3 SoftMax Classfier Loss
SoftMax与SVM不一样,它是找到每个分类的概率来进行分类(如公式)
-
计算Loss
SVM与SoftMax Loss的对比
- 前所述过程总结
2 optimization
- 首先有一点找F也叫H(就是数据分布下隐含的函数)的方式是Random Search,这种想法完全无法使用,尤其是数据维度高的时候。
-
Follow the Scope(GD方法)
但是计算剃度的时候是直接计算的(即analytic gradient)
但是这种方法的好处是可以验证你的梯度是不是对的在编程的时候In practice: Always use analytic gradient, but check implementation with numerical gradient. This is called a gradient check.- SGD的例子
- SGD的例子
Deal With Image Features
- RGB
处理特征的一些方法