Linear Models For Regression
Linear Models For Regression
• The simplest linear model for regression is one that involves a linear
combination of the input variables
Y ( X ,W ) = w0 + w1 x1 + w2 x2 + ... + wD xD , where X = ( x1 , x2 ,..., xD )
The goal of regression is to predict the value of one or more continuous target
variables t given the value of a D-dimensional vector x of input variables.
• Given a training data set comprising N observations {xn}, where n = 1,...,N together
with corresponding target values {tn}
• We model the predictive distribution p(t|x) to express the uncertainty about the
value of t for each value of x.
• Predictive distribution enable us to predict the value of t for a given value x such a
way that minimize the expected value of a suitably chosen loss function.
1 N
Squared Error Function : E ( w) = J (q1 ,q 2 ) = å (Yi -ti ) 2
2 i =1
We will succeed when our cost function is at the very bottom of the pits in our graph, i.e.
when its value is the minimum.
Thushari Silva, PhD Essentials of Machine Learning
Linear Regression - Gradient Descent
Gradient Descent
method
¶J (q 0 ,q1 )
q j := q j - a
¶q j
Simultaneously update j =0 and j=1
Trial and error method
Thushari Silva, PhD Essentials of Machine learning
Linear Regression - Gradient Descent
dJ (q1 )
q j := q j - a
dq1