Logistic Regression
Logistic Regression
• Logistic regression is one of the most popular Machine Learning algorithms, which comes under the
Supervised Learning technique.
• It is used for predicting the categorical dependent variable using a given set of independent variables.
• Logistic regression predicts the output of a categorical dependent variable.
• Therefore the outcome must be a categorical or discrete value.
• It can be either Yes or No, 0 or 1, true or False, etc. but instead of giving the exact value as 0 and 1, it gives
the probabilistic values which lie between 0 and 1.
• Logistic Regression is much similar to the Linear Regression except that how they are used.
• Linear Regression is used for solving Regression problems, whereas Logistic regression is used for
solving the classification problems.
• In Logistic regression, instead of fitting a regression line, we fit an "S" shaped logistic
function, which predicts two maximum values (0 or 1).
• The curve from the logistic function indicates the likelihood of something such as
whether the cells are cancerous or not, a mouse is obese or not based on its weight, etc.
• Logistic Regression is a significant machine learning algorithm because it has the ability
to provide probabilities and classify new data using continuous and discrete datasets.
• Logistic Regression can be used to classify the observations using different types of data
and can easily determine the most effective variables used for the classification.
• The below image is showing the logistic function:
Multinomial
Types of • In such a kind of classification, dependent variable can have 3 or
more possible unordered types or the types having no quantitative
Logistic significance.
• For example, these variables may represent “Type A” or “Type B”
Ordinal
Linear regression is used to estimate the dependent variable Whereas logistic regression is used to calculate the probability
in case of a change in independent variables. For example, of an event. For example, classify if tissue is benign or
predict the price of houses. malignant.
Linear regression assumes the normal or gaussian distribution Logistic regression assumes the binomial distribution of the
of the dependent variable. dependent variable.