Skip to content

Example: Customer Churn#

Using Keras to predict customer churn based on the IBM Watson Telco Customer Churn dataset. We also demonstrate using the lime package to help explain which features drive individual model predictions. In addition, we use three new packages to assist with Machine Learning: recipes for preprocessing, rsample for sampling data and yardstick for model metrics.

Background: Recreate the example in the “Deep Learning With Keras To Predict Customer Churn” post, published by Matt Dancho in the Tensorflow R package’s blog. The goal is to analyze the Telco Customer Churn Data using R with Keras and Tensorflow.

Code: https://github.com/sol-eng/tensorflow-w-r

R Notebook - Modeling#

In RStudio Connect: .../churn/modeling/tensorflow-w-r.nb.html

Built with: tensorflow, keras, lime, rsample, yardstick, corrr

R Notebook - Workflow#

In RStudio Connect: .../churn/workflow/tensorflow-drake.nb.html

Built with: tensorflow, keras, tidyverse, drake, yardstick

Tensorflow model#

In RStudio Connect: .../churn/tfmodel/

Built with: Tensorflow, Keras

Shiny app#

In RStudio Connect: .../churn/overtime/

Built with: shiny, recipies, httr, shinymaterial, r2d3