Linear Regression. Task: Learning a real valued function f: x->y where x=<x 1 ,…,x n > as a linear function of the input features x i : Using x 0 =1, we can write as:. Linear Regression. 3. Cost funct ion. We want to penalize from deviation from the target values:
An Image/Link below is provided (as is) to download presentation
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.Content is provided to you AS IS for your information and personal use only.Download presentation by click this link.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.During download, if you can't get a presentation, the file might be deleted by the publisher.
If we assume with e(i)being iid and normally distributed around zero. • we can see that the least-squares regression corresponds to finding the maximum likelihood estimate of θ:
Logistic Regression - Motivation • Letsnow focus on the binaryclassification problem in which • y can take on only two values, 0 and 1. • xis a vector of real-valued features, < x1… xn > • We could approach the classification problem ignoring the fact that y isdiscrete-valued, and use our old linear regression algorithm to try to predicty given x. • However, it is easy to construct examples where this methodperforms very poorly. • Intuitively, it also doesn’t make sense for h(x) to takevalues larger than 1 or smaller than 0 when we know that y ∈ {0, 1}.
Interpretation: hq(x) : estimate of probability that y=1 for a given x hq(x) = P(y = 1 | x; θ) Thus: P(y = 1 | x; θ) = hq(x) P(y = 0 | x; θ) = 1 − hq(x) • Which can be written more compactly as: P(y | x; θ) = (h(x))y (1 − h(x))1−y 21
Softmax Regression • Softmax regression model generalizes logistic regression to classification problems where the class label ycan take on more than two possible values. • The response variable y can take on any one of k values, so y ∈{1, 2, . . . , k}.
One fairly simple way to arrive at the multinomial logit model is to imagine, for K possible outcomes, running K-1 independent binary logistic regression models, in which one outcome is chosen as a "pivot" and then the other K-1 outcomes are separately regressed against the pivot outcome. This would proceed as follows, if outcome K (the last outcome) is chosen as the pivot:
Cost Function We now describe the cost function that we'll use for softmax regression. In the equation below, 1{.} is the indicator function, so that 1{a true statement} = 1, and 1{a false statement} = 0. For example, 1{2 + 2 = 4} evaluates to 1; whereas 1{1 + 1 = 5} evaluates to 0.