Underfitting and overfitting

一、underfitting 和 overfitting 中,error的变化情况

Underfitting and overfitting_第1张图片
IMG_20170425_135852.jpg

Underfitting:
training error will high, and cross validation error also will be high.
Overfitting:
training error will be low,but cross validation will be low.

二、在regularization中,lambda对error的影响

Underfitting and overfitting_第2张图片
IMG_20170425_144508.jpg

随着lambda 的增加,training error在增加,整个过程由overfitting->fitting->underfitting,所以cross validation由大->小->大。
实验中,需要不断调整lambda的值(一般从0逐渐增加,step可以为0.01,或者0.1等),最终找到error相对较小的lambda.

你可能感兴趣的:(Underfitting and overfitting)