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: Basics
Create a basic KNIME workflow to train a decision tree.
It’s your turn
- Create a workflow in KNIME to train a decision tree.
- 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: 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
- Download
the task sheet
- Open the task sheet in RStudio
- 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
- Either discover the functions for yourself or download
the task sheet
- Open the task sheet in RStudio
- Fill the gaps to obtain a confusion matrix and measure model
accuracy