Icon

05. Modelling Workflow with Integrated Deployment

Modelling Workflow with Integrated Deployment

This workflow shows a simple example of churn prediction with interactive threshold optimization. This workflow is used for showcasing Integrated Deployment introduce in KNIME 4.2. You can see how the trained model is automatically captured (via Capture Workflow nodes) and deployed (via a Workflow Writer node).

Train and Optimize Pre-processing - Join contract data and behavioral data - Convert Churn values to String to be used as class in upcoming classification - Reserve 80% of the rows for model training and remaining for model testing test set Reading and Blending - contract data + churn - behavioral (calls) data Score Evaluate predictions based on confusion matrix views. train set Capture for Deployment : Scoring - Missing value imputation modelling - Optimize Random Forest parameters - Optimize threshold Binary Classification - Train model with optimized parameters - Capture branch to deploy Capture for Deployment : Data Preparation Churn = 0 : current subscriptions Churn = 1 : cancelled subscriptions Deploy: Combine & Write Integrated Deployment (1/2)- Capture workflow parts using Capture Workflow Start & Capture Workflow End nodes for Data Preparation & Scoring- Combine captures using Workflow Combiner node- Write combined deployment workflow relative to the modeling workflow Integrated Deployment (2/2)- Deploy this workflow to your user folder on KNIME Server- Execute workflow on KNIME Server- Inspect resulting deployment workflow train: 80% test: 20%ReadingContractData.csvJoin the contract data and the behavioral dataArea code and churn are converted to String. optimized modeloptimize thresholdto max accuracyapply newthresholdoptimized thresholddefault 50% threshold DB Table Selector DB Connector Partitioning File Reader Joiner Number To String Random ForestLearner Random ForestPredictor Missing Value Missing Value(Apply) Binary ClassificationInspector Rule Engine Scorer (JavaScript) Scorer (JavaScript) DB Reader Database URL andCredentials Domain Calculator ParameterOptimization Table Rowto Variable Train and Optimize Pre-processing - Join contract data and behavioral data - Convert Churn values to String to be used as class in upcoming classification - Reserve 80% of the rows for model training and remaining for model testing test set Reading and Blending - contract data + churn - behavioral (calls) data Score Evaluate predictions based on confusion matrix views. train set Capture for Deployment : Scoring - Missing value imputation modelling - Optimize Random Forest parameters - Optimize threshold Binary Classification - Train model with optimized parameters - Capture branch to deploy Capture for Deployment : Data Preparation Churn = 0 : current subscriptions Churn = 1 : cancelled subscriptions Deploy: Combine & Write Integrated Deployment (1/2)- Capture workflow parts using Capture Workflow Start & Capture Workflow End nodes for Data Preparation & Scoring- Combine captures using Workflow Combiner node- Write combined deployment workflow relative to the modeling workflow Integrated Deployment (2/2)- Deploy this workflow to your user folder on KNIME Server- Execute workflow on KNIME Server- Inspect resulting deployment workflow train: 80% test: 20%ReadingContractData.csvJoin the contract data and the behavioral dataArea code and churn are converted to String. optimized modeloptimize thresholdto max accuracyapply newthresholdoptimized thresholddefault 50% threshold DB Table Selector DB Connector Partitioning File Reader Joiner Number To String Random ForestLearner Random ForestPredictor Missing Value Missing Value(Apply) Binary ClassificationInspector Rule Engine Scorer (JavaScript) Scorer (JavaScript) DB Reader Database URL andCredentials Domain Calculator ParameterOptimization Table Rowto Variable

Nodes

Extensions

Links