Presentation is loading. Please wait.

Presentation is loading. Please wait.

CHAPTER 10: Logistic Regression

Similar presentations


Presentation on theme: "CHAPTER 10: Logistic Regression"— Presentation transcript:

1 CHAPTER 10: Logistic Regression

2 Binary classification
Two classes Y = {0,1} Goal is to learn how to correctly classify the input into one of these two classes Class 0 – labeled as 0 Class 1 – labeled as 1 We would like to learn f : X → {0,1} Lecture Notes for E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1)

3 g(p)=ln (p/(1-p)) is the logit function
Since the output must be 0 or 1, we cannot directly use a linear model to estimate f(xi). Furthermore, we would like to estimate the probability Pr(yi=1|xi) as f(xi).Lets call it pi. We model the log of the odds of the probability pi as a linear function of the input xi. ln (p/(1-p)) = b.x g(p)=ln (p/(1-p)) is the logit function Lecture Notes for E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1)

4 Odds Ratio If there is a 75% chance that it will rain tomorrow, then 3 out of 4 times we say this it will rain. That means for every three times it rains once it will not. The odds of it raining tomorrow are 3 to 1. This can also be understood as (¾)/¼=3/1. If the odds that my horse to win the race is 1 to 3, that means for every 4 races it runs, it will win 1 and lose 3. Therefore I should be paid $3 for every dollar I bet.

5 logit-1 ( ln (p/(1-p)) )= sigmoid ( ln (p/(1-p)) ) = pi
ln (p/(1-p)) = b.x By applying the inverse of g() – the logistic function -- we get back p: logit-1 ( ln (p/(1-p)) )= sigmoid ( ln (p/(1-p)) ) = pi Applying it on the RHS as well, we get pi = logit-1 (b.xi) = 1 / (1 + e-b.xi) Lecture Notes for E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1)

6 The odds has a range of 0 to  with values :
Odds & Odds Ratios The odds has a range of 0 to  with values : greater than 1 associated with an event being more likely to occur than not to occur and values less than 1 associated with an event that is less likely to occur than not occur. The logit is defined as the log of the odds (- to +) As .x gets really big, p approaches 1 As .x gets really small, p approaches 0

7 The Logistic Regression Model
The "logit" model solves these problems: ln[p/(1-p)] = 0 + 1X p is the probability that the event Y occurs, p(Y=1) [range=0 to 1] p/(1-p) is the "odds ratio" [range=0 to ∞] ln[p/(1-p)]: log odds ratio, or "logit“ [range=-∞ to +∞]

8 Lecture Notes for E Alpaydın 2004 Introduction to Machine Learning © The MIT Press (V1.1)


Download ppt "CHAPTER 10: Logistic Regression"

Similar presentations


Ads by Google