Lecture 10 Logistic Regression Part 1
Lecture 10 Logistic Regression Part 1
Analytics
ITE 5201
Lecture10-Logistic Regression
Instructor: Parisa Pouladzadeh
Email: [email protected]
Simple linear regression
Table 1 Age and systolic blood pressure (SBP) among 33 adult women
220
180
160
140
120
100
80
20 30 40 50 60 70 80 90
Age (years)
y
Slope y = α + β 1x 1
x
Regression coefficient b1
◦ Measures association between y and x
◦ Amount by which y changes on average when x changes by one unit
◦ Least squares method
Linear regression?
N
o
0 2
0 4
0 6
0 8
0 1
00
A
GE(y
ears
)
Logistic regression is used to predict binary outputs with two possible values labeled "0" or "1"
o Logistic model output can be one of two classes: pass/fail, win/lose, healthy/sick
Hours Studying Pass/Fail
1 0
PASS/FAIL
1.5 0
2 0
LINEAR MODEL
3 1
3.25 0
4 1
5 1
HOURS OF STUDYING 6 1
LINEAR MODEL
PASS/FAIL
LOGISTIC REGRESSION
MODEL
HOURS OF STUDYING
LOGISTIC REGRESSION
MODEL
HOURS OF STUDYING
• Now we need to convert from a probability to a class value which is “0” or “1”.
PASS/FAIL
LOGISTIC REGRESSION
MODEL
Class 1
0.5
Class 0 THRESHOLD
HOURS OF STUDYING
For classification
Accuracy/Precision/Recall/F1-score, ROC curves,…
For regression
Normalized RMSE, Normalized Mean Absolute Error (NMAE)