2. Supervised Learning
• Regression
• Where the target variable are continuous in nature
• Scalar for single feature, and vector for multiple features 𝒚(𝑖)
or 𝒕(𝑖)
• Index (𝑖) is 1. . 𝑚 the number of data points.
• The index for feature is 𝑗 = 1. . 𝑛
• Logistic regression OR Classification
• Where the output if discrete in nature.
• 𝑦𝑖 ∈ 1,2, … . 𝐶𝑘 where 𝐶𝑘 is the class 𝑘
3. Regression Example: Learning a linear relationship
between attributes/features and responses/target.
• Problem Statement
Use the given data to
learn a model of
functional dependence
(if one exists) between
Olympics year and 100
m winning time and use
this model to make
predictions about the
winning times in future
games.
4. Single feature, Linear Model
• We assume a linear relationship between input and output
• Input x ( Single feature: the Olympics year) and output return t (the
winning time)
• Our mapping will have some parameters. The simplest linear model
hypothesis ℎ𝑤 𝑥; 𝒘 which approximates the target/output is defined as
t ≈ ℎ 𝑥; 𝑤0, 𝑤1 = 𝑤0 + 𝑤1𝑥
Where, 𝑤0 and 𝑤1 are parameters involved in the linear model.
• The learning task now involves finding the parameters from the data given
in the last slide.
5. Defining what a good model is?
• The parameters are found from a best fit to the data at hand.
• How do we define this best fit, or the closeness of the prediction by
the model, w.r.t the data? We define a loss function as a squared
difference between the true winning time, and the winning time
predicted by the model.
• The expression is known as squared loss function 𝑳𝒏 ∗ as it
describes how much accuracy we are loosing through the use of
𝑓 𝑥𝑛; 𝑤0, 𝑤1 in predicting 𝑡𝑛