check the accuracy on the training set

Logistic regression is used when the dependent variable is binary (True/False) in nature. Similarly the value of y ranges from 0 to 1 (**Figure 3**) and it is represented

> Odds ¼ p*=*ð Þ¼ 1 � p probability that event will occur*=*probability that the event will not occur

logit pð Þ¼ ln pð Þ¼ *=*ð Þ 1 � p b0 þ b1X1 þ b2X2 þ b3X3… þ bkXk Logistic regression is used in classification problems. For example to classify emails as spam or not and to predict whether the tumor is malignant or not. It is not mandatory that the input variables have linear relationship to the output variable [8]. The reason being that it makes us of nonlinear log transformation to the predicted odds. It is advised to make use of only the variables which are powerful

However, it is important to note the following while making use of logistic

The non-linear features should be transformed before using them.

from sklearn.linear\_model import LogisticRegression
