Blog_Banner_Asset
    Homebreadcumb forward arrow iconBlogbreadcumb forward arrow iconArtificial Intelligencebreadcumb forward arrow iconWhat is Multinomial Logistic Regression? Definition & Examples

What is Multinomial Logistic Regression? Definition & Examples

Last updated:
2nd Sep, 2022
Views
Read Time
8 Mins
share image icon
In this article
Chevron in toc
View All
What is Multinomial Logistic Regression? Definition & Examples

Logistic regression is a concept used in many fields, including machine learning. It is an example of a supervised machine learning algorithm that predicts or calculates the probability of occurrence of a binary (yes/no) event. For example, if we use machine learning to determine if an email is spam or not, we apply the logistic regression model. Now, the multinomial logistic regression classification technique is an extension of the logistic regression algorithm and solves problems that have multiple outcomes. 

Enrol for the Machine Learning Course from the World’s top Universities. Earn Masters, Executive PGP, or Advanced Certificate Programs to fast-track your career.

This article will look at the multinomial regression algorithm and its use in machine learning.

Variables in a Logistic Regression Model

The response variable is categorical in any logistic regression model. The value of a response, outcome, or dependent variable responds to changes in the independent or explanatory variables. 

Ads of upGrad blog

Variables in a Logistic Regression Model

Source

Here’s an example to understand the difference between an explanatory variable and a response variable.

Suppose a scientist wants to compare the effect of two different fertilisers, X and Y, on plant growth. The scientist randomly selects 100 plants from a field and applies fertiliser X to half of them for a week and fertiliser B to the other half for the same period. After a week, the scientist measures the average plant growth in each.

In this example, the type of fertiliser (X or Y) is the independent or explanatory variable the scientist changes to observe an effect on plant growth. On the contrary, plant growth is the dependent or response variable changing due to fertiliser application.

Best Machine Learning and AI Courses Online

The Three Types Of Logistic Regression

Before we go into the details of multinomial logistic regression, let’s look at the three kinds of logistic regression models.

Type of logistic regression modelDescriptionExample
1. Binary logistic regressionDependent variable belongs to only one of two categories.If a person is likely to get a positive COVID-19 result or not.
2. Ordinal logistic regressionDependent variable belongs to one of many categories with a natural ordering.Sorting the severity of a COVID-19 infection into mild, moderate, or severe.
3. Multinomial logistic regressionDependent variable belongs to one of many categories with no order.If a person has COVID-19, an allergy, a cold, or the flu.

Understanding the Multinomial Logistic Regression Algorithm

The multinomial logistic regression model is a classification algorithm that extends the concept of logistic regression to solve multiclass possible outcome problems with one or more independent variables. While binary logistic regression predicts binary outcomes (0 or 1, yes or no, spam or not spam, etc.), the multinomial regression model predicts one out of k possible outcomes (k can be any arbitrary positive integer). Multinomial logistic regression is also known as softmax regression, multiclass logistic regression, multinomial logit model, conditional maximum entropy model, and maximum entropy (MaxEnt) classifier. 

Dependent Variable in Multinomial Logistic Regression

The dependent variable in the multinomial logistic regression algorithm can have two or more possible classes/outcomes. The dependent variable is nominal, meaning there is no order in the target-dependent classes. In other words, we cannot meaningfully order these classes. Thus, multinomial logistic regression is practical to make classifications based on the values of a set of predictor variables. 

Here’s a simple example to understand the dependent and independent variables in multinomial logistic regression:

Suppose we have a machine learning model that uses multinomial logistic regression to predict the ice cream flavour a person is likely to choose. Here, factors such as the person’s age, gender, mood, occasion, income status, and price of ice cream are the independent variables that determine the ice cream flavour the person will possibly go for. In this example, the dependent variable is the ice cream flavour that can belong to many categories (chocolate, vanilla, butterscotch, coffee, etc.).

Assumptions for Multinomial Logistic Regression

When you choose multinomial logistic regression as the classification algorithm for your machine learning problem, you must ensure the data you analyse satisfies the following assumptions. 

Assumption #1

The dependent variable should be either nominal or ordinal. A nominal variable has two or more categories with no meaningful ordering, such as three types of cuisines: Continental, Chinese, and Italian. On the contrary, ordinal variables have two or more categories with an order. An example of an ordinal variable would be the grades in an exam, that is, Excellent (A), Good (B), and Average ( C ). 

Assumption #2

You have a set of one or more independent variables that can be continuous, nominal, or ordinal. Continuous variables are numeric variables and can have an infinite number of values within a specified range. However, you must treat ordinal independent variables as continuous or nominal when running a multinomial logistic regression in SPSS.

Assumption #3

The observations must be independent, and the dependent variables must be mutually exhaustive and exclusive. Mutually exhaustive implies every observation must fall into some category of the dependent variable. On the other hand, mutually exclusive means when there are two or more categories of the variable, no observation falls into more than one category.

Assumption #4

There must be no multicollinearity amidst independent variables. Multicollinearity happens when more than two independent variables have a high correlation, making it difficult to understand the contribution of each independent variable to the dependent variable category. 

Assumption #5

The data points must not have outliers, highly influential points, or high leverage values. 

Assumption #6

Lastly, any constant independent variable and the dependent variable’s logit transformation must have a linear relationship. The idea behind a logit is to restrict the probability values between 0 and 1 using a logarithmic function. Most multinomial logistic regression models are based on logit functions. 

Multinomial Regression Using SPSS

IBM® SPSS® Statistics is a robust statistical software platform used by researchers for various complex statistical data analyses. This section will give an example of data analysis using multinomial logistic regression on the SPSS platform.

For multinomial logistic regression, we consider a situation to understand if a person’s income and belief that taxes are too high determine the political party they vote for. The dependent variable is the political party with three categories (A, B, and C). The independent variables are the person’s income, and their belief that taxes are too high with four ordered categories (“Strongly Agree,” “Agree,” Disagree,” and “Strongly Disagree”).

Here are the steps of the analysis in SPSS Statistics:

1. Under the SPSS main menu, click Analyze > Regression > Multinomial Logistic…
Analyze > Regression > Multinomial Logistic

Source

The following Multinomial Logistic Regression dialogue box opens.

Multinomial Logistic Regression dialogue box opens

Source

2. Enter “politics” (the dependent variable), “tax_too_high” (the ordinal variable ), and “income” (the covariate variable).in the Dependent, Factor(s), and Covariate(s) boxes, respectively.

Enter Politics

 

Source

3. Now, click on the Statistics option, and you’ll get the following Multinomial Logistic Regression: Statistics dialogue box.

Multinomial Logistic Regression: Statistics

Source

4. Check the following boxes: Cell probabilities, Classification table, and Goodness-of-fit.

Select Cell probabilities, Classification table, and Goodness-of-fit

Source

5. Click Continue to return to the Multinomial Logistic Regression dialogue box.

6. Click OK to generate the results.

Popular AI and ML Blogs & Free Courses

Summing Up

Multinomial logistic regression is used for classification problems when the dependent variable or output is categorical or dichotomous. While analysing data using multinomial regression, you must keep in mind certain assumptions around the different dependent and independent variables, observations, and training data available. Multinomial logistic regression is a widely used classification algorithm in machine learning. 

Ads of upGrad blog

If you’re looking to enhance your machine learning and AI skills, here’s your chance with upGrad’s Master of Science in Machine Learning & AI in association with Liverpool John Moores University. 

Programme Highlights:

  • Master’s degree from LJMU
  • Executive PGP from IIIT Bangalore
  • 750+ hours of learning
  • 90 live sessions
  • 15+ case studies and assignments
  • 11 coding assignments
  • Comprehensive coverage of 20 top languages, tools, and libraries

Sign up today to get exclusive upGrad benefits such as 360-degree career support services, hands-on projects and hackathons, personalised mentorship from industry experts, peer networking opportunities, and much more!

Profile

Pavan Vadapalli

Blog Author
Director of Engineering @ upGrad. Motivated to leverage technology to solve problems. Seasoned leader for startups and fast moving orgs. Working on solving problems of scale and long term technology strategy.
Get Free Consultation

Selectcaret down icon
Select Area of interestcaret down icon
Select Work Experiencecaret down icon
By clicking 'Submit' you Agree to  
UpGrad's Terms & Conditions

Our Popular Machine Learning Course

Frequently Asked Questions (FAQs)

1What is logistic regression in machine learning?

In machine learning, logistic regression is a type of supervised learning to predict the probability of occurrence of a binary (yes/no) event.

2What are the three types of logistic regression?

The three main types of logistic regression are: Binary logistic regression, Multinomial logistic regression, Ordinal logistic regression.

3What is the difference between multivariate and multinomial regression?

Multivariate regression is a situation with multiple dependent variables. On the other hand, multinomial regression refers to cases when we have one dependent variable with two or more levels but more than one independent variable.

Explore Free Courses

Suggested Blogs

15 Interesting MATLAB Project Ideas & Topics For Beginners [2024]
82457
Diving into the world of engineering and data science, I’ve discovered the potential of MATLAB as an indispensable tool. It has accelerated my c
Read More

by Pavan Vadapalli

09 Jul 2024

5 Types of Research Design: Elements and Characteristics
47126
The reliability and quality of your research depend upon several factors such as determination of target audience, the survey of a sample population,
Read More

by Pavan Vadapalli

07 Jul 2024

Biological Neural Network: Importance, Components & Comparison
50612
Humans have made several attempts to mimic the biological systems, and one of them is artificial neural networks inspired by the biological neural net
Read More

by Pavan Vadapalli

04 Jul 2024

Production System in Artificial Intelligence and its Characteristics
86790
The AI market has witnessed rapid growth on the international level, and it is predicted to show a CAGR of 37.3% from 2023 to 2030. The production sys
Read More

by Pavan Vadapalli

03 Jul 2024

AI vs Human Intelligence: Difference Between AI & Human Intelligence
112983
In this article, you will learn about AI vs Human Intelligence, Difference Between AI & Human Intelligence. Definition of AI & Human Intelli
Read More

by Pavan Vadapalli

01 Jul 2024

Career Opportunities in Artificial Intelligence: List of Various Job Roles
89547
Artificial Intelligence or AI career opportunities have escalated recently due to its surging demands in industries. The hype that AI will create tons
Read More

by Pavan Vadapalli

26 Jun 2024

Gini Index for Decision Trees: Mechanism, Perfect & Imperfect Split With Examples
70805
As you start learning about supervised learning, it’s important to get acquainted with the concept of decision trees. Decision trees are akin to
Read More

by MK Gurucharan

24 Jun 2024

Random Forest Vs Decision Tree: Difference Between Random Forest and Decision Tree
51730
Recent advancements have paved the growth of multiple algorithms. These new and blazing algorithms have set the data on fire. They help in handling da
Read More

by Pavan Vadapalli

24 Jun 2024

Basic CNN Architecture: Explaining 5 Layers of Convolutional Neural Network
270717
Introduction In the last few years of the IT industry, there has been a huge demand for once particular skill set known as Deep Learning. Deep Learni
Read More

by MK Gurucharan

21 Jun 2024

Schedule 1:1 free counsellingTalk to Career Expert
icon
footer sticky close icon