D Dev Duniya
Back to Journal
2 min read

Complete guide about types of Logistic Regression and Binary Logistic Regression | DevDuniya

Ashish Yadav

Ashish Yadav

Published on Dev Duniya
Keep exploring
Compare the details before you buy.

What is Logistic Regression?

Logistic Regression is a powerful and widely used statistical method in machine learning for classification problems. Despite the name "regression," it's fundamentally a classification algorithm.

How it Works:

Logistic Regression models the probability of an instance belonging to a particular class. It uses a sigmoid function (also known as the logistic function) to map the input values to a probability between 0 and 1.

Key Applications:

  • Spam detection: Classifying emails as spam or not spam.
  • Customer churn prediction: Predicting whether a customer will leave a company.
  • Disease diagnosis: Predicting the presence or absence of a disease.
  • Credit risk assessment: Assessing the risk of loan default.

Types of Logistic Regression:-

1. Binary Logistic Regression

This is the most common type of logistic regression. It deals with situations where the output variable has only two possible categories (binary outcomes).

Examples:

  • Predicting whether an email is spam or not.
  • Determining if a customer will make a purchase or not.
  • Classifying images as containing a cat or not containing a cat.

Mathematical Representation:

  • The output of a binary logistic regression model is typically represented as the probability of the instance belonging to the positive class (e.g., probability of spam).
  • The sigmoid function maps the input values to a probability between 0 and 1.

2. Multinomial Logistic Regression

This type of logistic regression handles situations where the output variable has three or more unordered categories.

Examples:

  • Predicting the preferred type of cuisine (e.g., Italian, Mexican, Indian).
  • Classifying images into different animal categories (e.g., cat, dog, bird).
  • Predicting the political affiliation of a person (e.g., Democrat, Republican, Independent).

Key Concept:

Multinomial logistic regression estimates the probability of an instance belonging to each of the possible classes.

3. Ordinal Logistic Regression

This type deals with situations where the output variable has three or more ordered categories.

Examples:

  • Predicting customer satisfaction levels (e.g., very dissatisfied, dissatisfied, neutral, satisfied, very satisfied).
  • Rating movies on a scale of 1 to 5 stars.
  • Assessing credit risk levels (e.g., low, medium, high).

Key Concept:

Ordinal logistic regression accounts for the order of the categories in the output variable.

Logistic Regression is a versatile and powerful classification algorithm with various applications. Understanding the different types of logistic regression allows you to choose the appropriate method for your specific machine learning problem.

Keep reading

12 latest articles

The newest stories from Dev Duniya, excluding the article you are reading.

All articles →

From the product catalog

Explore device specifications

Specification cards update automatically from published catalog products, grouped by brand.

Apple specifications

Explore Apple devices →
Apple Apple iPhone Duo
Apple Apple iPhone Duo specifications

Apple iPhone Duo is a new-generation iPhone model focused on a sleek design, powerful performance, and everyday usability. Explore iPhone Duo specifications, features, display, cameras, battery, and expected price in the USA. Get the latest information about Apple iPhone Duo and its key features. Compare iPhone Duo with other popular Apple iPhone models.

Size (inches)
Open: 4.64 x 6.48 x 0.21 Closed: 4.64 x 3.31 x 0.44
Weight (ounces)
8.96
Display size (inches)
Inner: 7.6-inch (diagonal) all-screen OLED folding display Outer: 5.4-inch (diagonal) all-screen OLED display
Resolution (pixels)
Inner: 1878-by-2670-pixel resolution at 430 ppi Outer: 1398-by-2034-pixel resolution at 460 ppi
See all specifications →
Apple Apple iPhone 18 Pro Max
Apple Apple iPhone 18 Pro Max specifications

Apple iPhone 18 Pro Max is a high-end flagship smartphone designed for powerful performance and advanced photography. Explore iPhone 18 Pro Max specifications, features, display, cameras, battery, and expected price in the USA. Discover the latest upgrades and key features of Apple’s largest Pro iPhone. Compare iPhone 18 Pro Max with other premium flagship smartphones.

Size (inches)
6.43 x 3.07 x 0.34
Weight (ounces)
8.78
Display size (inches)
6.9-inch (diagonal) all-screen OLED display
Resolution (pixels)
2868-by-1320-pixel resolution at 460 ppi
See all specifications →
Apple Apple iPhone 18 Pro
Apple Apple iPhone 18 Pro specifications

Apple iPhone 18 Pro is a premium flagship smartphone with advanced performance and an upgraded camera system. Explore iPhone 18 Pro specifications, features, display, cameras, battery, and expected price in the USA. Get the latest details about Apple’s new Pro model and its key upgrades. Compare iPhone 18 Pro features with other flagship smartphones.

Size (inches)
5.91 x 2.83 x 0.34
Weight (ounces)
7.44
Display size (inches)
6.3-inch (diagonal) all-screen OLED display
Resolution (pixels)
2622-by-1206-pixel resolution at 460 ppi
See all specifications →

Google specifications

Explore Google devices →

Samsung specifications

Explore Samsung devices →