当只有一个参数w时:
当有两个参数w、b:
加上正则化项:
w越小,则使得input影响越小,训练的function越平滑,loss function如果加上regularization,则w越小,对loss的影响越少
https://www.bilibili.com/video/BV1Ht411g7Ef?p=3
https://github.com/datawhalechina/team-learning-data-mining/tree/master/EnsembleLearning
https://www.bilibili.com/video/BV1Mb4y1o7ck?p=15
图例为linear regression的情况
rss=regressional sum of square (回归平方和)
对于线性回归来说,加上L2的loss function求导为
由图所知,倒数存在多个解?(L2来说倒数在y轴正负两端,无限逼近于0)所以此时loss function与w、b的图像是凹凸不平的
(有关缩写:
https://www.zhihu.com/question/27367245/answer/99198072
https://blog.csdn.net/YUZHOUYANGAND/article/details/118404590
)