Data Science for Marketing Analytics: A practical guide to forming a killer marketing strategy through data analysis with Python, 2nd Edition
- Length: 400 pages
- Edition: 2
- Language: English
- Publisher: Packt Publishing
- Publication Date: 2021-09-09
- ISBN-10: 1800560478
- ISBN-13: 9781800560475
- Sales Rank: #1146575 (See Top 100 Books)
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.
Data Science for Marketing Analytics second edition Preface About the Book About the Authors Who This Book Is For About the Chapters Conventions Code Presentation Minimum Hardware Requirements Downloading the Code Bundle Setting Up Your Environment Installing Anaconda on Your System Launching Jupyter Notebook Installing the ds-marketing Virtual Environment Running the Code Online Using Binder Get in Touch Please Leave a Review 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 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 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 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 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 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 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 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 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 1. Data Preparation and Cleaning Activity 1.01: Addressing Data Spilling 2. Data Exploration and Visualization Activity 2.01: Analyzing Advertisements 3. Unsupervised Learning and Customer Segmentation Activity 3.01: Bank Customer Segmentation for Loan Campaign Activity 3.02: Bank Customer Segmentation with Multiple Features 4. Evaluating and Choosing the Best Segmentation Approach Activity 4.01: Optimizing a Luxury Clothing Brand's Marketing Campaign Using Clustering Activity 4.02: Evaluating Clustering on Customer Data 5. Predicting Customer Revenue Using Linear Regression Activity 5.01: Examining the Relationship between Store Location and Revenue Activity 5.02: Predicting Store Revenue Using Linear Regression 6. More Tools and Techniques for Evaluating Regression Models Activity 6.01: Finding Important Variables for Predicting Responses to a Marketing Offer Activity 6.02: Using RFE to Choose Features for Predicting Customer Spend Activity 6.03: Building the Best Regression Model for Customer Spend Based on Demographic Data 7. Supervised Learning: Predicting Customer Churn Activity 7.01: Performing the OSE technique from OSEMN Activity 7.02: Performing the MN technique from OSEMN 8. Fine-Tuning Classification Algorithms Activity 8.01: Implementing Different Classification Algorithms Activity 8.02: Tuning and Optimizing the Model Activity 8.03: Comparison of the Models 9. Multiclass Classification Algorithms Activity 9.01: Performing Multiclass Classification and Evaluating Performance Activity 9.02: Dealing with Imbalanced Data Using scikit-learn Hey!
Donate to keep this site alive
How to download source code?
1. Go to: https://github.com/PacktPublishing
2. In the Find a repository… box, search the book title: Data Science for Marketing Analytics: A practical guide to forming a killer marketing strategy through data analysis with Python, 2nd Edition
, sometime you may not get the results, please search the main title.
3. Click the book title in the search results.
3. Click Code to download.
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.