Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Data Science for Marketing Analytics

You're reading from   Data Science for Marketing Analytics A practical guide to forming a killer marketing strategy through data analysis with Python

Arrow left icon
Product type Paperback
Published in Sep 2021
Publisher Packt
ISBN-13 9781800560475
Length 636 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Authors (3):
Arrow left icon
Vishwesh Ravi Shrimali Vishwesh Ravi Shrimali
Author Profile Icon Vishwesh Ravi Shrimali
Vishwesh Ravi Shrimali
Mirza Rahim Baig Mirza Rahim Baig
Author Profile Icon Mirza Rahim Baig
Mirza Rahim Baig
Gururajan Govindan Gururajan Govindan
Author Profile Icon Gururajan Govindan
Gururajan Govindan
Arrow right icon
View More author details
Toc

Table of Contents (11) Chapters Close

Preface
1. Data Preparation and Cleaning 2. Data Exploration and Visualization FREE CHAPTER 3. Unsupervised Learning and Customer Segmentation 4. Evaluating and Choosing the Best Segmentation Approach 5. Predicting Customer Revenue Using Linear Regression 6. More Tools and Techniques for Evaluating Regression Models 7. Supervised Learning: Predicting Customer Churn 8. Fine-Tuning Classification Algorithms 9. Multiclass Classification Algorithms Appendix

Understanding Logistic Regression

Logistic regression is one of the most widely used classification methods, and it works well when data is linearly separable. The objective of logistic regression is to squash the output of linear regression to classes 0 and 1. Let's first understand the "regression" part of the name and why, despite its name, logistic regression is a classification model.

Revisiting Linear Regression

In the case of linear regression, our mapping function would be as follows:

Figure 7.2: Equation of linear regression

Here, x refers to the input data and θ0 and θ1 are parameters that are learned from the training data.

Also, the cost function in the case of linear regression, which is to be minimized, is the root mean squared error (RMSE), which we discussed in the previous chapter.

This works well for continuous data, but the problem arises when we have a categorical target variable, such as 0 or 1. When we try to use linear regression...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at AU $24.99/month. Cancel anytime