Lec03 2 Linear Regression Slides
Lec03 2 Linear Regression Slides
Gradient Descent
Alice Gao
Learning Objectives
By the end of this lecture, you should be able to
w ← w − 𝛼 ∇w 𝐹(w)
or
"#(%) "#(%)
𝑤! ← 𝑤! − 𝛼 ......... 𝑤( ← 𝑤( − 𝛼
"'! "'"
Each update
Direction Negative of gradient’s sign
Size Proportional to gradient’s magnitude
In practice:
• Stop when the change in 𝐹(w) is small enough.
• Stop when we are tired of waiting.
𝛼 )
w ← w − X (Xw − t)
𝑁
or
-
𝛼
w ← w − 2 x * (𝐰 ) x (*) − t (*) )
𝑁
*+,
Loss function Quantifies how badly the model fits the data.
Optimization
Fit a model that minimizes the loss.
algorithm