Why use ML for marketing? Strategies and use cases

Machine Learning for Marketing in Python

Karolis Urbonas

Head of Analytics & Science, Amazon

Types of machine learning

  • Supervised learning
    • Given X, can we predict Y?
    • Classification - when Y is categorical (e.g. Churned/Not-churned, Yes/No, Fish/Dog/Cat).
    • Regression - when Y is continuous (e.g. Purchases, Clicks, Time Spent on Website).
  • Unsupervised learning
    • Given X, can we detect patterns and clusters that are homogenous?
  • Reinforcement learning
    • Given a current state and a number potential actions, which path maximizes the reward?
Machine Learning for Marketing in Python

Supervised learning data parts and steps

  1. Define the target (dependent variable or Y) - what do we want to predict?

    • Example 1 - which customers will churn? [CLASSIFICATION]
    • Example 2 - which customers will buy again? [CLASSIFICATION]
    • Example 3 - how much will customers spend in the next 30 days? [REGRESSION]
  2. Collect features (independent variables or X) which could have predictive power:

    • Example 1 - Purchase patterns prior churning.
    • Example 2 - Number of missed loan payments prior defaulting on a loan.
Machine Learning for Marketing in Python

Supervised learning data format

  • X by N+1 matrix:
    • X number of observations (customer, vendor, product)
    • N + 1 number of columns (N features + 1 target variable)
Feature 1 Feature 2 ... Feature N Target Y
11 21 N1 Y1
12 22 N2 Y2
Machine Learning for Marketing in Python

Unsupervised learning

Collect usage or purchase data and run model to identify homogenous groups i.e. clusters or segments of data:

  • Example 1 - customer segmentation by their product purchases.
  • Example 2 - product segmentation for bundling
Machine Learning for Marketing in Python

Unsupervised learning data format

  • X by N matrix:
    • X number of observations (customer, vendor, product)
    • N number of columns (N features)
  • A list of independent variables (features) as separate columns for each observation
Feature 1 Feature 2 ... Feature N
11 21 N1
12 22 N2
Machine Learning for Marketing in Python

Let's practice!

Machine Learning for Marketing in Python

Preparing Video For Download...