Regularization

作者: spraysss | 来源:发表于2020-01-28 15:54 被阅读0次

    overfitting

    如果特征过多,但是训练集不够时,很有可能会出现overfitting

    解决overfitting的几种方法

    减少特征数
    • 手动选择需要保留哪些特征
    • Model selection algorithm
    Regularization

    cosf function
    J(\theta_0,\theta_1,...,\theta_n)=\frac{1}{2m}\sum_{i=1}^{m}(h_\theta(x^i)-y^i)^2+\frac{1}{2m}\lambda\sum_{j=1}^n\theta_j^2

    • Keep all the features,but reduce magnitude/values of parameters \theta_j
      it works well when we have a lot of features,each of which contributes a bit to predicting y

    相关文章

      网友评论

        本文标题:Regularization

        本文链接:https://www.haomeiwen.com/subject/vstmthtx.html