# Purchase Prediction from Ads — Logistic Regression
**Stack:** Python, scikit-learn, pandas, matplotlib, seaborn, Logistic Regression, Jupyter
**Date:** October 2025
## Overview
Binary classification project using logistic regression to predict purchase behavior from social network ad exposure with detailed EDA and salary-based feature engineering.
## Key Highlights
- Built a binary classifier to predict purchase behavior after social network ads using logistic regression and feature engineering.
- Performed EDA with distribution checks, correlation analysis, scatter plots, and purchase rate visualizations.
- Scaled numeric features, binned EstimatedSalary into quantiles, and applied one-hot encoding to capture non-linear income effects.
- Achieved strong generalization with test accuracy improvements from ~0.863 to ~0.950 after salary binning and one-hot encoding.
## Features
- Exploratory Data Analysis with descriptive statistics and visualization
- StandardScaler feature scaling on Age and EstimatedSalary
- Logistic Regression baseline modeling with reproducible train/test split
- Quantile-based salary binning to capture non-linear purchase behavior
- Ordinal and one-hot encoding for engineered salary features
- Evaluation using accuracy, confusion matrix, and classification report
- Reproducible Jupyter notebook workflow with fixed random seed
## Tech Stack
Python, scikit-learn, pandas, matplotlib, seaborn, Logistic Regression, Jupyter
---
For more details, check out the [Projects](/projects) page or explore other [Experiences](/experience).