Icon

Building a Churn Prediction Model

Training a Churn Predictor

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

Churn Prediction: TrainingThis 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. The workflow is also available in the EXAMPLES server under 50_Applications/_18_Churn_PredictionUse Case is described at URL: https://www.knime.org/knime-applications/churn-predictionImplementation is described in this KNIMETV video "Building a basic Model for Churn Prediction with KNIME" https://youtu.be/RHsO10q7e2Y Data Reading Two files: - contract data + churn - behavioral (calls) dataBoth files are located inTheData/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 for model testing - Use same number of data rows for both classes in testing Score the ModelRemember to use the Predictornode appropriate for your model!Evaluate predictions based onconfusion matrix and ROC. Train a ModelThe Decision Tree here is just an example. Open the Decision Tree Learner view to see thedecision tree paths. training set test set Churn = 0 customerremained with contractChurn = 1 customer quitcontract 80% vs. 20%Apply the trained modelto predict ChurnColor rows by churn valueChurn = 0 -> BlueChurn = 1 -> RedSave model in PMML formatReadingContractData.csvJoin the contract data and the behavioral dataTarget Class = ChurnBuild ROC for predictionsArea codeand churn 0/1are converted toString. Reading CallsData.xlsMatch original vs. predicted Churn values Partitioning Decision TreePredictor Color Manager PMML Writer File Reader Joiner DecisionTree Learner ROC Curve Number To String Excel Reader (XLS) Scorer Churn Prediction: TrainingThis 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. The workflow is also available in the EXAMPLES server under 50_Applications/_18_Churn_PredictionUse Case is described at URL: https://www.knime.org/knime-applications/churn-predictionImplementation is described in this KNIMETV video "Building a basic Model for Churn Prediction with KNIME" https://youtu.be/RHsO10q7e2Y Data Reading Two files: - contract data + churn - behavioral (calls) dataBoth files are located inTheData/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 for model testing - Use same number of data rows for both classes in testing Score the ModelRemember to use the Predictornode appropriate for your model!Evaluate predictions based onconfusion matrix and ROC. Train a ModelThe Decision Tree here is just an example. Open the Decision Tree Learner view to see thedecision tree paths. training set test set Churn = 0 customerremained with contractChurn = 1 customer quitcontract 80% vs. 20%Apply the trained modelto predict ChurnColor rows by churn valueChurn = 0 -> BlueChurn = 1 -> RedSave model in PMML formatReadingContractData.csvJoin the contract data and the behavioral dataTarget Class = ChurnBuild ROC for predictionsArea codeand churn 0/1are converted toString. Reading CallsData.xlsMatch original vs. predicted Churn values Partitioning Decision TreePredictor Color Manager PMML Writer File Reader Joiner DecisionTree Learner ROC Curve Number To String Excel Reader (XLS) Scorer

Nodes

Extensions

Links