Page 304 - Artificial Intellegence_v2.0_Class_11
P. 304
Logistic Regression
Logistic regression is an algorithm used to predict a binary outcome, either something is going to happen or it is not
going to happen. This can be expressed as yes / no, pass / fail, survival / death, etc. The independent variable can
be categorical or numeric, but the dependent variable is always categorical. So, consider using some data x, logistic
regression tries to find out whether some event y occurs or not. So, y can either be 0 or 1. In the case the event takes
place, y is given the value 1. If the event does not occur, then y is given the value of 0. For example, if y represents
whether a photo contains a tree, then y will be 1 if the image has a tree or y will be 0 if it does not. The graph shows an
example of a logistic curve, where the values of y cannot be less than 0 or greater than 1.
1
0.9
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
–6 –4 –2 0 2 4 6
Some real-world examples where Logistic Regression has been effectively used are:
• Credit Card Fraud Detection: In a credit card transaction, the bank records several factors like transaction date,
amount, location, type of purchase, etc.
The logistic regression model uses these factors to identify fraudulent transactions. For example, if the amount is
too high and the bank knows that the person concerned has never spent such a large amount, they can mark this as
fraud.
• Marketing: Every day when you browse the news feed on your Facebook account, powerful algorithms in the
background predict if you are interested in certain content (like certain advertisements). This type of algorithm can
be thought of as a complex version of the logistic regression algorithm where the question to be answered is simple:
Will the user like this particular advertisement or not?
• Tumour Prediction: Logistic regression algorithms are used to identify whether a tumour is malignant or benign.
Several medical imaging techniques are used to extract various features from tumour images. For example, the size
of the tumour, the affected body region, etc. These features are then input into a logistic regression classifier model
to identify whether the tumour is malignant or benign.
302 Touchpad Artificial Intelligence (Ver. 2.0)-XI

