Practising Supervised Learning:
Decision Trees

Prof. Dr. Mirco Schoenfeld

Beware

Attention, this task can be solved in two ways!

Choose Wisely

Choose wisely!

 

Make sure to visualize the decision tree properly!

Visual Solution

Visual Solution: Basics

Create a basic KNIME workflow to train a decision tree.

It’s your turn

  1. Create a workflow in KNIME to train a decision tree.
  2. Visualize a dendrogram.

Visual Solution: Quality Metrics

Extend your workflow to quantify the quality of the model

It’s your turn

Extend your KNIME workflow to create a confusion matrix and measure accuracy of the model.

Programming Solution

Programming Solution: Basics

First, create a basic script for training a decision tree.

Again, you can use the programming language of your choice.

A solution will be provided in R.

It’s your turn

  1. Download the task sheet
  2. Open the task sheet in RStudio
  3. Fill the gaps to train a decision tree
    If you want to read what a function (e.g. train) does use ? to access its documentation (i.e. ?train)

Programming Solution: Quality Metrics

Now, extend your script to measure model quality

It’s your turn

  1. Either discover the functions for yourself or download the task sheet
  2. Open the task sheet in RStudio
  3. Fill the gaps to obtain a confusion matrix and measure model accuracy
Back to Lecture Website