Skip to main content

Digital Marketing Ads Clustering Using Machine Learning


The ads24x7 is a Digital Marketing company which has now got seed funding of $10 Million. They are expanding their wings in Marketing Analytics. They collected data from their Marketing Intelligence team and now wants you (their newly appointed data analyst) to segment type of ads based on the features provided. Use Clustering procedure to segment ads into homogeneous groups.


🔍 Project Objective

This project focuses on applying unsupervised machine learning and dimensionality reduction techniques to solve two real-world analytical problems:

  1. Segment digital advertisements based on performance metrics to optimize marketing strategy.

  2. Reduce high-dimensional census data using PCA to extract meaningful population insights efficiently.

The project demonstrates strong skills in EDA, clustering, PCA, business interpretation, and actionable recommendations.


🧠 Part 1: Digital Marketing Ads Clustering (Business Analytics + ML)

📌 Problem Statement

A digital marketing company wanted to segment advertisements into homogeneous groups based on performance indicators such as CTR, CPM, CPC, revenue, spend, device type, and platform.

⚙️ Approach

  • Performed detailed EDA (univariate & bivariate analysis)

  • Treated missing values using domain-specific formulas for CTR, CPM, and CPC

  • Detected and treated outliers using the IQR method

  • Applied z-score scaling to improve clustering performance

  • Used:

    • Hierarchical Clustering (Ward + Euclidean)

    • K-Means Clustering

  • Identified optimal clusters using:

    • Elbow method

    • Silhouette score

📊 Key Results

  • Optimal number of clusters identified as 5

  • Each cluster represented a distinct ad performance pattern

  • Certain clusters delivered high revenue with low CPC

  • Large ad sizes did not necessarily translate to better performance

💡 Business Insights

  • Video ads generated the highest average revenue

  • Mobile ads had lower CPM and higher reach

  • Poster-sized vertical ads showed best CTR and efficiency

  • A significant portion of ads consumed budget with poor ROI

📈 Recommendations

  • Increase investment in mobile video ads

  • Prioritize poster-sized creatives for higher conversions

  • Reduce spend on clusters with high CPC & low revenue

  • Use clustering as a recurring optimization strategy


📉 Part 2: Census Data Analysis Using PCA (Data Science)

📌 Problem Statement

The Indian Census dataset contained 57+ highly correlated variables, making analysis complex and inefficient.
Objective was to reduce dimensionality while retaining maximum variance.

⚙️ Approach

  • Conducted EDA on selected demographic and workforce variables

  • Treated outliers and scaled data using z-score normalization

  • Verified suitability using:

    • Bartlett’s Test of Sphericity

    • KMO Test (0.93 – excellent adequacy)

  • Applied Principal Component Analysis (PCA) using Scikit-learn

  • Used Scree plot and cumulative explained variance for PC selection

📊 Key Results

  • Reduced 57 variables → 5 principal components

  • These 5 PCs explained 90.6% of total variance

  • Principal components captured:

    • Population size

    • Workforce composition

    • Agricultural labor patterns

    • Gender-based employment distribution

💡 Insights

  • Strong correlation between male & female population metrics

  • Workforce participation patterns varied significantly across states

  • PCA successfully eliminated multicollinearity while preserving structure


🛠 Skills Demonstrated

Technical Skills

  • Python, Pandas, NumPy

  • Scikit-learn

  • Clustering (K-Means, Hierarchical)

  • PCA & linear algebra concepts

  • Data preprocessing & scaling

Analytics & Business Skills

  • Exploratory Data Analysis

  • Marketing analytics

  • KPI interpretation

  • Insight generation

  • Recommendation framing


🚀 Business Impact

  • Enables data-driven ad optimization

  • Reduces marketing spend inefficiency

  • Improves campaign ROI and targeting

  • Simplifies complex demographic datasets for faster decision-making


🏁 Conclusion

This project showcases my ability to:

  • Translate business problems into data science solutions

  • Apply machine learning practically, not theoretically

  • Convert complex analysis into clear business recommendations



🔗 Project Resources

  • 📁 Dataset & Code

  • 📊 Report


















Comments

Popular posts from this blog

Power BI Sales & Inventory Forecasting Project (SARIMA)

Project Overview In this project, I built an end-to-end Business Analytics & Data Science solution using SQL, Power BI, and Python to: Analyze historical sales, profit, discounts, and units sold Build an Executive Summary Dashboard for leadership Forecast next 3 months of Sales & Units Sold Support inventory planning and business decision-making This project simulates a real-world eCommerce / Retail analytics use case , combining ETL, BI reporting, and predictive modeling in a single workflow. Business Objective Primary Goals Provide leadership with a single-source executive dashboard Identify sales, profit, and regional performance trends Predict future demand (Sales & Units Sold) for: Inventory planning Revenue forecasting Procurement & supply-chain readiness Key Questions Answered How are sales and profits trending over time? Which regions and segments drive the most value? What will be the expected sales & unit demand for the next 3 months? Architecture ...

Data Analysis and Visualization with Matplotlib and Seaborn | TOP 10 code snippets for practice

Data visualization is an essential aspect of data analysis. It enables us to better understand the underlying patterns, trends, and insights within a dataset. Two of the most popular Python libraries for data visualization are Matplotlib and Seaborn . Both libraries are highly powerful, and they can be used to create a wide variety of plots to help researchers, analysts, and data scientists present data visually. In this article, we will discuss the basics of both libraries, followed by the top 10 most used code snippets for visualization. We'll also provide links to free resources and documentation to help you dive deeper into these libraries. Matplotlib and Seaborn: A Quick Overview Matplotlib Matplotlib is a low-level plotting library in Python. It allows you to create static, animated, and interactive plots. It provides a lot of flexibility but may require more code to create complex plots compared to Seaborn. Matplotlib is especially useful when you need full control ove...

Election Data Classification Project – End-to-End Analysis

Problem Definition The objective of this project is to predict voter preference (Labour vs Conservative) using demographic, economic perception, political leadership ratings, and political awareness variables. This is a binary classification problem , where the target variable is: vote_Labour (1 = Labour, 0 = Conservative) The analysis aims to: Understand data structure and distributions Identify relationships between predictors and voting behavior Build and compare multiple classification models Select the best model based on performance metric Git Link Dataset Overview Rows: 1,525 voters Columns: 9 features + 1 target Data Types: Numerical: Age, economic conditions, leader ratings, political knowledge Categorical: Vote, Gender Missing Values: None Duplicates: 8 (not materially impactful) Target Variable Distribution Labour voters: ~70% Conservative voters: ~30% ➡️ Dataset is moderately imbalanced , which makes recall and AUC important evaluation metrics in addition to accuracy...