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>
Annotations and comments
  • 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.
  • Creating flow variable To control CASE Switch
  • Model evaluation
  • Case 1 (port 0): Rule set
  • Case 2 (port 1): Decision tree
  • Reading data
  • Case 3 (port 2): PNN
  • collect data with predictions
  • collect model
  • Active port derived from index value of selected option
  • cars-85.csv
  • Train model to predict "make"
  • Apply trained model on training set
  • Evaluate Model
  • List with options to choose predictive model

Nodes

Extensions

Links