Linear Models: CS771: Introduction To Machine Learning Piyush Rai
Linear Models: CS771: Introduction To Machine Learning Piyush Rai
Linear Models: CS771: Introduction To Machine Learning Piyush Rai
For binary classfn, can treat as the “score” of input and threshold to get binary label
𝑦 =argmax 𝑘∈ {1,2 , …, 𝐾 } 𝒘 ⊤
𝑘 𝒙
Once learned (using some optimization technique), these weight vectors (one for each
class) can sometimes have nice interpretations, especially when the inputs are images
The learned weight
These images sort
vectors of each of the 4 of look like class
classes visualized as prototypes if I
images – they kind of were using LwP
look like a “template” of 𝒘 𝑐𝑎𝑟 𝒘 𝑓𝑟𝑜𝑔 𝒘 h𝑜𝑟𝑠𝑒 𝒘 𝑐𝑎𝑡
Yeah, “sort of”.
what the images from
That’s why the dot product of each of these weight vectors with No wonder why LwP (with
that class should look an image from the correct class will be expected to be the largest Euclidean distances) acts
like like a linear model. CS771: Intro to ML
6
Simple Linear Models as Building Blocks
Linear models are building blocks for dimensionality reduction methods like PCA
Linear models are building blocks for even deep learning model (each layer is like a multi-
output linear model, followed by a nonlinearity)
CS771: Intro to ML
7
Learning Linear Models
CS771: Intro to ML
8
Next Lecture
Linear Regression
CS771: Intro to ML