Comments (1)
Improve Performance on Testing Set
1 - Early Stopping
使用validation set进行early stopping。
2 - Regularization
最好的参数不仅仅能够使得Cost function最小,而且其norm也是很小的(模型很平滑)。
Gradient:
Update Role:
相比于没有regularizer,参数更新的公式多了一项$(1 - \lambda\eta)$,通常该值略小于1,所以参数每次在更新之前都会被缩小,虽然每次都会乘以一个小于1的数,但是并不是每一个参数都会变为0,因为还有$\eta \frac{\partial L(\theta)}{\partial w^t}$,只有当$\frac{\partial L(\theta)}{\partial w^t}$也是0的时候,参数才会变为0,而这也是合理的,$\frac{\partial L(\theta)}{\partial w^t}$为0说明该参数对于loss function的来说没有影响。
L1 regularization:
Gradient:
Update Role:
从上面的更新规则可以看出,当参数为负时,会加一个值;参数为正时,会减去一个值,这会导致参数有很大的可能性更新到0。L2在更新的过程中,对较大的参数惩罚程度较大,而对于较小的参数惩罚较小,所以参数一般不会被更新到0,而是都在0附近。
3 - Dropout
- Training
对于每一个mini-batch,都要重新选择失活的neurons。 - Testing
- no dropout
- 如果训练时,drop prob=p%,那么在测试的时候,所有的参数乘以1-p%
为什么dropout会有用呢?Dropout is a kind of ensemble
dropout在训练时的过程如下:每一个batch的数据使用一个不同的network来训练。
在进行测试时候,dropout运用了一个近似的方式:
但是在这个例子中,激活函数是线性的,但是实证结果表示,对于使用非linear activation function的network来说,dropout也可以work的很好。有论文指出:maxout network(可以视为linear network)+drouput会得到更好的结果。
from machine-learning-2017-fall.
Related Issues (10)
- Part 1. Introduction of Machine Learning
- Part 2. Regression - Case Study
- Part 3. Where does the error come from?
- Part 4. Gradient Descent
- Part 5. Classification
- Part 6. Logistic Regression HOT 2
- Part 7. Brief Introduction of Deep Learning
- Part 8. BackPropagation
- Part 10. Convolutional Neural Network
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from machine-learning-2017-fall.