天天看點

(2020李宏毅)機器學習-Regression

(2020李宏毅)機器學習-Regression

文章目錄

  • ​​Regression: Output a scalar(标量)​​
  • ​​Example Application​​
  • ​​Step 1: Model​​
  • ​​Step 2: Goodness of Function​​
  • ​​Step 3: Best Function​​

Regression: Output a scalar(标量)

  • Stock Market Forecast(股票市場預測)
  • (2020李宏毅)機器學習-Regression
  • Self-driving Car
  • (2020李宏毅)機器學習-Regression
  • Recommendation(推薦)
  • (2020李宏毅)機器學習-Regression

Example Application

預測寶可夢的CP值
(2020李宏毅)機器學習-Regression

Step 1: Model

Step 2: Goodness of Function

Training Data: 10 pokemons

Loss function 𝐿:==>

Step 3: Best Function

  • Gradient Descent
  • (2020李宏毅)機器學習-Regression
上述梯度求出來是個負值,代表左高右低,說明L取最小值要往w增大(也就是負梯度的方向移動),是以,同理梯度是正值時,也是這個公式

梯度下降中的梯度(gradient):

兩個變量時的計算:

公式推導見:​​javascript:void(0)中的2.7 梯度下降的線性回歸​​

如果選用更複雜的模型,資料如下:
(2020李宏毅)機器學習-Regression
(2020李宏毅)機器學習-Regression
會産生過拟合問題(overfitting)

過拟合解決方案:Regulation

Smaller means smoother

input:

output:

If w is smaller,output 對 input越不sensitive

繼續閱讀