Logistic Regression Hands-On
Logistic Regression Hands-On
Logistic Regression Hands-On
8.2 Sensitivity
In this case the bank will retrieve the data of the customer
from their previous interactions and leverage machine learning
algorithms like Logistic regression to predict which customer
will be interested in the insurance and which will not.
Question:
Now, what do you think we need
to do with these missing values?
1 18
2 20
3 15 Median 18
4 ?
5 70
Question:
Now how do you think we can
handle the outliers?
<0.02 Useless
>0.5 Suspicious
Question
What do you think the diagram is trying to tell us?
Y X1
Now, if we can see here Y has correlation with X1, X2 and X3.
Y X2
Question:
But, what if X1 ~ X2?
X1 X2 X3 X4
If there is an earthquake(mild) a
person may still go shopping.
0.2
X1 X2 X3 X4 (0.9)
~
(R2)
X2 X1 X2 X4 (0.1)
~
(R2)
X3 X1 X2 X4 (0.8)
~
(R2)
X4 X1 X2 X3 (0.2)
~
(R2)
Formula:
1
1-r2
X3 X2 X4 (0.1)
~
R2
X4 X2 X3 (0.1)
~
R2
As we have seen above by evaluating the hidden correlation of X1 with other variables
helped eliminate correlation of X3 with other variables.
This simply means that sometimes eliminating hidden correlations can result in a stable
correlations among other variables.
Step 10: Splitting the data into train and test set.
The process of testing the model with the test data after
training the model is called model validation.
Accuracy
Sensitivity
Shown are the steps for model
validation.
Specificity
ROC Curve
TP+TN
TP+TN+FP+FN
Formula:
True Positive
True Positive +False Negative
Formula:
True Negative
ROC Curve shows us the relationship between true positive and true
negative.
sales@intellipaat.com
support@intellipaat.co
m