Icon

Building a Churn Prediction Model

There has been no title set for this workflow's metadata.

This workflow is an example of how to build a basic PMML model for a churn prediction using a Decision Tree algorithm.

URL: Build a workflow https://www.knime.com/getting-started
URL: KNIME Quickstart Guide https://docs.knime.com/latest/analytics_platform_quickstart_guide/index.html

Annotations and comments
  • Building a Churn Prediction Model This workflow illustrates how to build and evaluate a churn prediction model, i.e. predict the likelihood that a customer will churn a specific contract.
  • Task Train and evaluate a model to predict customer churn.
  • Data Reading Two files: - Contract data + churn - Behavioral (calls) data Both files are located in TheData/Customers
  • Pre-processing - Join contract data and behavioral data - Convert Churn values to String to be used as class in upcoming classification - Color rows by churn value - Reserve 80% of the rows for model training and remaining 20% for model testing - Use same distribution of classes in training and testing
  • Train a Model The Decision Tree here is just an example. Open the Decision Tree Learner view to see the decision tree paths.
  • Score the Model Remember to use the Predictor node appropriate for your model! Evaluate predictions based on confusion matrix created with the Scorer node.
  • training set
  • test set
  • Churn = 0 customer remained with contract Churn = 1 customer quit contract
  • Reading ContractData.csv
  • Target Class = Churn
  • Apply the trained model to predict Churn
  • Reading CallsData.xls
  • Join the contract data and the behavioral data
  • Area code and churn 0/1 are converted to String.
  • Save model in PMML format
  • Training set 80% vs. Test set 20%
  • Match original vs. predicted Churn values

Nodes

Extensions

Links