Icon

4. CASE Switch

<p><strong>CASE Switch</strong></p><p>This workflow implements a CASE Switch to control workflow execution. The goal is to classify the car makers based on the cars they produce. The target class is the "make" column. The choice of which prediction algorithm is used is left to the end user and can be selected through the <em>Value Selection Widget</em> node. The choices are </p><ul><li><p> a set of rules (top branch), </p></li><li><p>a Decision Tree (middle branch) or, </p></li><li><p>a PNN (bottom branch).</p></li></ul><p>Depending on which predictive model has been chosen, the corresponding port of the <em>CASE Switch Start</em> node is activated and the respective model is trained and applied. The predictions are collected in the <em>CASE Switch End </em>node (data ports), and performances on the training set are evaluated at the end with a <em>Scorer </em>node. The important part is to produce predictions in an output column that is named the same on all three branches. The selected trained model is collected with a separate <em>CASE Switch End</em> node (model ports) and written to a file.</p>

Workflow: CASE Switch


This workflow implements a CASE Switch to control workflow execution. The goal is to classify the car makers based on the cars they produce. The target class is the "make" column. The choice of which prediction algorithm is used is left to the end user and can be selected through the Value Selection Widget node. The choices are

  • a set of rules (top branch),

  • a Decision Tree (middle branch) or,

  • a PNN (bottom branch).

Depending on which predictive model has been chosen, the corresponding port of the CASE Switch Start node is activated and the respective model is trained and applied. The predictions are collected in the CASE Switch End node (data ports), and performances on the training set are evaluated at the end with a Scorer node. The important part is to produce predictions in an output column that is named the same on all three branches. The selected trained model is collected with a separate CASE Switch End node (model ports) and written to a file.

Reading data

Creating flow variable

To control CASE Switch

CASE Switch

Case 1 (port 0): Rule set

Case 2 (port 1): Decision tree

Case 3 (port 2): PNN

Model evaluation

collect data with predictions
CASE Switch End
collect model
CASE Switch End
Active port derived fromindex value of selected option
CASE Switch Start
Evaluate Model
Scorer
List with options tochoose predictive model
Single Selection Widget
A set of rules
Expression
Train model to predict "make"
Decision Tree Learner
cars-85.csv
CSV Reader
Train model to predict "make"
PNN Learner (DDA)
Apply trained modelon training set
PNN Predictor
Apply trained modelon training set
Decision Tree Predictor

Nodes

Extensions

Links