<p><b>Turbocharge your marketing plans by making the leap from simple descriptive statistics in Excel to sophisticated predictive analytics with the Python programming language</b></p><h4>Key Features</h4><ul><li>Use data analytics and machine learning in a sales and marketing context</li><li>Gain i
Data Science for Marketing Analytics: A practical guide to forming a killer marketing strategy through data analysis with Python, 2nd Edition
β Scribed by Mirza Rahim Baig, Gururajan Govindan, Vishwesh Ravi Shrimali
- Publisher
- Packt Publishing
- Year
- 2021
- Tongue
- English
- Leaves
- 637
- Edition
- 2
- Category
- Library
No coin nor oath required. For personal study only.
β¦ Synopsis
Turbocharge your marketing plans by making the leap from simple descriptive statistics in Excel to sophisticated predictive analytics with the Python programming language
Key Features
- Use data analytics and machine learning in a sales and marketing context
- Gain insights from data to make better business decisions
- Build your experience and confidence with realistic hands-on practice
Book Description
Unleash the power of data to reach your marketing goals with this practical guide to data science for business.
This book will help you get started on your journey to becoming a master of marketing analytics with Python. You'll work with relevant datasets and build your practical skills by tackling engaging exercises and activities that simulate real-world market analysis projects.
You'll learn to think like a data scientist, build your problem-solving skills, and discover how to look at data in new ways to deliver business insights and make intelligent data-driven decisions.
As well as learning how to clean, explore, and visualize data, you'll implement machine learning algorithms and build models to make predictions. As you work through the book, you'll use Python tools to analyze sales, visualize advertising data, predict revenue, address customer churn, and implement customer segmentation to understand behavior.
By the end of this book, you'll have the knowledge, skills, and confidence to implement data science and machine learning techniques to better understand your marketing data and improve your decision-making.
What you will learn
- Load, clean, and explore sales and marketing data using pandas
- Form and test hypotheses using real data sets and analytics tools
- Visualize patterns in customer behavior using Matplotlib
- Use advanced machine learning models like random forest and SVM
- Use various unsupervised learning algorithms for customer segmentation
- Use supervised learning techniques for sales prediction
- Evaluate and compare different models to get the best outcomes
- Optimize models with hyperparameter tuning and SMOTE
Who This Book Is For
This marketing book is for anyone who wants to learn how to use Python for cutting-edge marketing analytics. Whether you're a developer who wants to move into marketing, or a marketing analyst who wants to learn more sophisticated tools and techniques, this book will get you on the right path.
Basic prior knowledge of Python and experience working with data will help you access this book more easily.
β¦ Table of Contents
Cover
FM
Copyright
Table of Contents
Preface
Chapter 1: Data Preparation and Cleaning
Introduction
Data Models and Structured Data
pandas
Importing and Exporting Data with pandas DataFrames
Viewing and Inspecting Data in DataFrames
Exercise 1.01: Loading Data Stored in a JSON File
Exercise 1.02: Loading Data from Multiple Sources
Structure of a pandas DataFrame and Series
Data Manipulation
Selecting and Filtering in pandas
Creating DataFrames in Python
Adding and Removing Attributes and Observations
Combining Data
Handling Missing Data
Exercise 1.03: Combining DataFrames and Handling Missing Values
Applying Functions and Operations on DataFrames
Grouping Data
Exercise 1.04: Applying Data Transformations
Activity 1.01: Addressing Data Spilling
Summary
Chapter 2: Data Exploration and Visualization
Introduction
Identifying and Focusing on the Right Attributes
The groupby(Β Β ) Function
The unique(Β Β ) function
The value_counts(Β Β ) function
Exercise 2.01: Exploring the Attributes in Sales Data
Fine Tuning Generated Insights
Selecting and Renaming Attributes
Reshaping the Data
Exercise 2.02: Calculating Conversion Ratios for Website Ads.
Pivot Tables
Visualizing Data
Exercise 2.03: Visualizing Data With pandas
Visualization through Seaborn
Visualization with Matplotlib
Activity 2.01: Analyzing Advertisements
Summary
Chapter 3: Unsupervised Learning and Customer Segmentation
Introduction
Segmentation
Exercise 3.01: Mall Customer Segmentation β Understanding the Data
Approaches to Segmentation
Traditional Segmentation Methods
Exercise 3.02: Traditional Segmentation of Mall Customers
Unsupervised Learning (Clustering) for Customer Segmentation
Choosing Relevant Attributes (Segmentation Criteria)
Standardizing Data
Exercise 3.03: Standardizing Customer Data
Calculating Distance
Exercise 3.04: Calculating the Distance between Customers
K-Means Clustering
Exercise 3.05: K-Means Clustering on Mall Customers
Understanding and Describing the Clusters
Activity 3.01: Bank Customer Segmentation for Loan Campaign
Clustering with High-Dimensional Data
Exercise 3.06: Dealing with High-Dimensional Data
Activity 3.02: Bank Customer Segmentation with Multiple Features
Summary
Chapter 4: Evaluating and Choosing the Best Segmentation Approach
Introduction
Choosing the Number of Clusters
Exercise 4.01: Data Staging and Visualization
Simple Visual Inspection to Choose the Optimal Number of Clusters
Exercise 4.02: Choosing the Number of Clusters Based on Visual Inspection
The Elbow Method with Sum of Squared Errors
Exercise 4.03: Determining the Number of Clusters Using the Elbow Method
Activity 4.01: Optimizing a Luxury Clothing Brand's Marketing Campaign Using Clustering
More Clustering Techniques
Mean-Shift Clustering
Exercise 4.04: Mean-Shift Clustering on Mall Customers
Benefits and Drawbacks of the Mean-Shift Technique
k-modes and k-prototypes Clustering
Exercise 4.05: Clustering Data Using the k-prototypes Method
Evaluating Clustering
Silhouette Score
Exercise 4.06: Using Silhouette Score to Pick Optimal Number of Clusters
Train and Test Split
Exercise 4.07: Using a Train-Test Split to Evaluate Clustering Performance
Activity 4.02: Evaluating Clustering on Customer Data
The Role of Business in Cluster Evaluation
Summary
Chapter 5: Predicting Customer Revenue Using Linear Regression
Introduction
Regression Problems
Exercise 5.01: Predicting Sales from Advertising Spend Using Linear Regression
Feature Engineering for Regression
Feature Creation
Data Cleaning
Exercise 5.02: Creating Features for Customer Revenue Prediction
Assessing Features Using Visualizations and Correlations
Exercise 5.03: Examining Relationships between Predictors and the Outcome
Activity 5.01: Examining the Relationship between Store Location and Revenue
Performing and Interpreting Linear Regression
Exercise 5.04: Building a Linear Model Predicting Customer Spend
Activity 5.02: Predicting Store Revenue Using Linear Regression
Summary
Chapter 6: More Tools and Techniques for Evaluating Regression Models
Introduction
Evaluating the Accuracy of a Regression Model
Residuals and Errors
Mean Absolute Error
Root Mean Squared Error
Exercise 6.01: Evaluating Regression Models of Location Revenue Using the MAE and RMSE
Activity 6.01: Finding Important Variables for Predicting Responses to a Marketing Offer
Using Recursive Feature Selection for Feature Elimination
Exercise 6.02: Using RFE for Feature Selection
Activity 6.02: Using RFE to Choose Features for Predicting Customer Spend
Tree-Based Regression Models
Random Forests
Exercise 6.03: Using Tree-Based Regression Models to Capture Non-Linear Trends
Activity 6.03: Building the Best Regression Model for Customer Spend Based on Demographic Data
Summary
Chapter 7: Supervised Learning: Predicting Customer Churn
Introduction
Classification Problems
Understanding Logistic Regression
Revisiting Linear Regression
Logistic Regression
Cost Function for Logistic Regression
Assumptions of Logistic Regression
Exercise 7.01: Comparing Predictions by Linear and Logistic Regression on the Shill Bidding Dataset
Creating a Data Science Pipeline
Churn Prediction Case Study
Obtaining the Data
Exercise 7.02: Obtaining the Data
Scrubbing the Data
Exercise 7.03: Imputing Missing Values
Exercise 7.04: Renaming Columns and Changing the Data Type
Exploring the Data
Exercise 7.05: Obtaining the Statistical Overview and Correlation Plot
Visualizing the Data
Exercise 7.06: Performing Exploratory Data Analysis (EDA)
Activity 7.01: Performing the OSE technique from OSEMN
Modeling the Data
Feature Selection
Exercise 7.07: Performing Feature Selection
Model Building
Exercise 7.08: Building a Logistic Regression Model
Interpreting the Data
Activity 7.02: Performing the MN technique from OSEMN
Summary
Chapter 8: Fine-Tuning Classification Algorithms
Introduction
Support Vector Machines
Intuition behind Maximum Margin
Linearly Inseparable Cases
Linearly Inseparable Cases Using the Kernel
Exercise 8.01: Training an SVM Algorithm Over a Dataset
Decision Trees
Exercise 8.02: Implementing a Decision Tree Algorithm over a Dataset
Important Terminology for Decision Trees
Decision Tree Algorithm Formulation
Random Forest
Exercise 8.03: Implementing a Random Forest Model over a Dataset
Classical Algorithms β Accuracy Compared
Activity 8.01: Implementing Different Classification Algorithms
Preprocessing Data for Machine Learning Models
Standardization
Exercise 8.04: Standardizing Data
Scaling
Exercise 8.05: Scaling Data After Feature Selection
Normalization
Exercise 8.06: Performing Normalization on Data
Model Evaluation
Exercise 8.07: Stratified K-fold
Fine-Tuning of the Model
Exercise 8.08: Fine-Tuning a Model
Activity 8.02: Tuning and Optimizing the Model
Performance Metrics
Precision
Recall
F1 Score
Exercise 8.09: Evaluating the Performance Metrics for a Model
ROC Curve
Exercise 8.10: Plotting the ROC Curve
Activity 8.03: Comparison of the Models
Summary
Chapter 9: Multiclass Classification Algorithms
Introduction
Understanding Multiclass Classification
Classifiers in Multiclass Classification
Exercise 9.01: Implementing a Multiclass Classification Algorithm on a Dataset
Performance Metrics
Exercise 9.02: Evaluating Performance Using Multiclass Performance Metrics
Activity 9.01: Performing Multiclass Classification and Evaluating Performance
Class-Imbalanced Data
Exercise 9.03: Performing Classification on Imbalanced Data
Dealing with Class-Imbalanced Data
Exercise 9.04: Fixing the Imbalance of a Dataset Using SMOTE
Activity 9.02: Dealing with Imbalanced Data Using scikit-learn
Summary
Appendix
Index
π SIMILAR VOLUMES
Get complete instructions for manipulating, processing, cleaning, and crunching datasets in Python. Updated for Python 3.6, the second edition of this hands-on guide is packed with practical case studies that show you how to solve a broad set of data analysis problems effectively. YouΓll learn the l
<p><b>Get to grips with pandas - a fast, versatile, and high-performance Python library for data discovery, data manipulation, data preparation, and handling data for analytical tasks</b></p><h4>Key Features</h4><ul><li>Perform efficient data analysis and manipulation tasks using pandas 1.x</li><li>
<p><span>Get to grips with pandas - a fast, versatile, and high-performance Python library for data discovery, data manipulation, data preparation, and handling data for analytical tasks</span></p><h4><span>Key Features</span></h4><ul><li><span><span>Perform efficient data analysis and manipulation