Website Adclick Case Study with Logistic Regression in Python

Overview

• Logistic Regression is a popular classification algorithm used to predict a binary outcome.
• In this case study, get an introduction to logistic regression without relying on Python’s sci-kit library.
• There are various metrics to evaluate a logistic regression model, such as confusion matrix, AUC-ROC curve, etc.
• In this notebook, we aim to create a Logistic Regression without the help of in-built Logistic Regression libraries.
• This will help to fully understand how Logistic Regression works in the backend.

Introduction

Logistic regression is a regression analysis that predicts the probability of an outcome that can only have two values. Under a given set of conditions, one can make every machine learning algorithm work properly. It is important to ensure that the algorithm fits the assumptions/requirements which make way for superior performance. However, there are certain limitations: One cannot use linear regression on a categorical dependent variable because one will get extremely low adjusted R² and F statistic values. However, in such situations, one should try using algorithms such as Logistic Regression, Decision Trees, SVM, Random Forest, etc.

With this case study by one of our students, Ivy Professional School aims at providing practical knowledge about data science. In this post, we will learn about a case study of an ‘Ad-Click Project.’ Python codes are implemented in this case study which aims at using the website data of customers. Furthermore, this case study aims to understand which customer will click on the advertisement. By the end of this section, we will make predictions using the “home-made” Logistic Regression.

With this post, Ivy Professional School aims to provide useful knowledge on Logistic Regression. After you’ve mastered linear regression, this comes as the natural following step in your journey. It’s also easy to learn and implement, but you must know the science behind this algorithm. Find the case study here and the coding file on Ivy Professional School’s GitHub account.