Escolar Documentos
Profissional Documentos
Cultura Documentos
Learning:
Linear Models
P J Narayanan
IIIT Hyderabad
Outline
• Model fi:ng: Predic<on of y from x
– Linear regression: Model is linear
– Gradient descent method to find best fi:ng line
• Logis<c regression: when y is binary
– Func<on model is different
– Gradient descent works
– Used for classifica<on. Gives probabili<es
y = f(x)
output prediction function feature or
representation
• Training: given a training set of labeled examples {(x1,y1), …, (xN,yN)}, estimate the prediction
function f by minimizing the prediction error.
• Testing: apply f to a never before seen test example x and output the predicted value y = f(x)
IIIT Hyderabad
T
w·x = w x = w0 .1 + w1 x1 + w2 x1 + · · · + wd xd
IIIT Hyderabad
Gradient Descent
• This is a vector of d
dimensions, like x, w
IIIT Hyderabad
Wikipedia
• Can be interpreted as a
probability
P(success) = f(effort) Use kz to make it steeper.
IIIT Hyderabad
with parameters w
non-linear
February 10, 2018 AI/ML Course 25
Binary Classifica<on
decision boundaries
February 10, 2018 AI/ML Course 29
Decision Boundary
• Decision boundary: hyperplane
T
w x=0
• Class 1 lies on the posi<ve side
and Class 0 on the nega<ve side
– t=1 for Class 1 and t= -1 for Class 0
– Negate features of Class 0 by (tx)
1X T
• For each training sample xj, J(w) = (w (txj ))2
distance to line wT (txj) ≥ 0 2 j
• Loss func<on J(w) X
rJ(w) = [wT (txj )] (txj )
• Gradient Descent can work! j
IIIT Hyderabad