Icon

Exercise2

<p><strong>Chapter4/Exercise 2</strong></p><p>This is an exercise for model improvement by changing the classification thresholds. In the previous exercise "Chapter 4/Exercise 1" some patterns were not correctly classified. By applying a different set of thresholds to the output probabilities, the final wine classification can be improved.</p><p>The key node of this exercise is the <em>Expression </em>node at the end, defining a set of thresholds for a more exact classification.</p>

URL: KNIME Beginner's Luck (Book Homepage) https://www.knime.com/knimepress/beginners-luck

Annotations and comments
  • Workflow: Chapter 4/Exercise 2 This is an exercise for model improvement by changing the classification thresholds. In the previous exercise "Chapter 4/Exercise 1" some patterns were not correctly classified. By applying a different set of thresholds to the output probabilities, the final wine classification can be improved. The key node of this exercise is the Expression node at the end, defining a set of thresholds for a more exact classification.
  • Reading data
  • Transforming data
  • Training model
  • Applying trained model
  • Postprocessing data
  • Evaluating model
  • wine.csv
  • Class back to 1,2,3
  • More conservative classes: if pred class > 0.7 => class 3, if pred class < 0.3 => class 1, otherwise class 2
  • Convert "Class" to String
  • Min-Max-Normalization in [0,1]
  • Apply Min-Max-Normalization
  • 80% vs. 20%
  • 14-10-3
  • Confusion matrix Class vs. Prediction

Nodes

Extensions

Links