Hands-on Tutorials

A guide to answering the question, “What drives the winningness of candy?”

Image for post
Image for post
Image by author, dashboard available here

In a Data Science interview a year ago, I was challenged to use a small data set from our friends at FiveThirtyEight to suggest how best to design a good-selling candy. “Based on ‘market research’ you see here,” the prompt gestured, “advise the product design team on the best features of a candy that we can sell alongside brand-name candies.”

Image for post
Image for post
The original dataset from FiveThirtyEight, available online here

As a data scientist in the applied, commercial world, the word best is always a weasel word intended to test your business awareness. One of the tell-tale signs of a greener data scientist is whether they’re thinking about the best business outcome vs. the best machine learning model. ‘Best’ is a balance of ‘what candy elements drive the highest satisfaction/enjoyment?’ and ‘what candy elements drive the highest price?’ …


An Easy-to-follow guide to driving business value with unsupervised ML in Python

Image for post
Image for post
Transforming a 3-dimensional synthesis of 40-dimensional data into interpretable customer segments is a breeze with this tutorial.

Targeted marketing requires that we identify cohorts — or segments — of customers, and define what the characteristics are that bring them together. When developing a new brand, for example, you want to know if the new offering is likely to acquire customers from other parts of your portfolio who may or may not be highly-engaged with your current offerings. When defining and flagging audiences, you might want to define different cohorts of viewing behaviors. There are just as many applications of segmentation as there are ways to implement it in python using ML.

In this tutorial, my goal is to guide you through the initial experimentation for customer segmentation. I’ll be using the Kaggle Teleco data to help you…


Image for post
Image for post
In a matter of seconds, you can see what elements of your product Customers talk about in Online Reviews.

Understanding Business Reviews at Scale

Businesses want to understand the types of experiences their customers are having, and what elements of a shopping experiences are successes or areas for opportunity. In the old days, we might send surveyors out to poll what people are saying, and then read through a few hundred to pull out key elements of their experience.

That has all changed in the age of online reviews, where millions reviews are globally posted per day. We can’t read all of those. We need to analyze them differently, and we need to share the results in a visual way.

If you’re interested in mining online reviews to find customer pain points or successes in a few lines of code, without any models, this is the tutorial for you! …


Image for post
Image for post
A histogram with 10 bins. Because why not 10? It’s what my data viz instructor told me to do…

Histograms are a crucial part of Exploratory Data Analysis. They save us from being tricked by something like “On average, our widgets reach 1000 people.” That’s a great average! But what’s the range? Distribution? Standard deviation? Variance? These can all be answered through one simple visualization: a histogram.

But there’s a problem with histograms as they’re typically made: Binning. Time for a PSA:

Stop. Randomly. Binning. Histograms. There’s a way to do it. With math.

Let’s take a leap into being better, more rigorous communicators and think about binning our histograms to realistically reflect the quantitative landscape. Below, I start with the concept of histograms and how they’re important. Then I jump into some code and math. …

About

Bryce Macher

I lead Customer Engagement ML & DS at Discovery Channel. I’m also Distinguished Faculty and the chair for global DS Fundamentals @ General Assembly

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store