0%

Addressing overfitting

Hey

Machine Learning notes

Addressing overfitting

options:

​ 1 .Reduce number of features

​ Manually select which features to keep

​ Model selection algorithm()

​ 2.Regularization

​ Keep all the features,but reduce magnitude/value parameters

​ Works well when we have a lot of features,each of which contributes a bit ot predicting

​ small values for parameters

​ 3. Regularized linear regression

  1. Gradient descent
    Image text
  1. normalization equation

    1. 奇异矩阵的判断方法:

      首先,看这个矩阵是不是方阵(即行数和列数相等的矩阵。若行数和列数不相等,那就谈不上奇异矩阵和非奇异矩阵)。 然后,再看此方阵的行列式| A |是否等于0,若等于0,称矩阵A为奇异矩阵;若不等于0,称矩阵A为非奇异矩阵。 同时,由| A |≠0可知矩阵A可逆,这样可以得出另外一个重要结论:可逆矩阵就是非奇异矩阵,非奇异矩阵也是可逆矩阵。

    Image text

这里一定是可逆的的矩阵,虽然X^TX可能不可逆,但是加入惩罚因子后,其和的行列式不为0,所以其可逆

  1. regularization logistic regression

    logistic regression 和 linear regression 区别在与costFunction和是否使用sigimoid function

    Image text