Administrative Information
Title | Decision trees |
Duration | 2 x 45 mins |
Module | A |
Lesson Type | Practical |
Focus | Practical - AI Modelling |
Topic | Data analysis |
Keywords
Dataset generation,Fitting,Model complexity,
Learning Goals
- learn basics of decision trees
Expected Preparation
Learning Events to be Completed Before
Obligatory for Students
- Lecture: Data Preparation and Exploration
- Lab session: Data Preparation and Exploration
Optional for Students
None.
References and background for students
- Scikit-Learn
- Keras
- Decision Tree on wikipedia
- Ron Kohavi, "Scaling Up the Accuracy of Naive-Bayes Classifiers: a Decision-Tree Hybrid", Proceedings of the Second International Conference on Knowledge Discovery and Data Mining, 1996.
- https://scikit-learn.org/stable/modules/tree.html
- https://pulplearning.altervista.org/algoritmi-di-machine-learning-decision-tree/
- https://www.kaggle.com/code/hamelg/python-for-data-29-decision-trees/notebook
- https://towardsdatascience.com/decision-trees-in-machine-learning-641b9c4e8052
Recommended for Teachers
None.
Lesson materials
Instructions for Teachers
This learning event consist of laboratory tasks that shall be solved by the students with the help of the leading instructor.
You can base this class around the notebooks.
Outline/time schedule[edit | edit source]
Duration (min) | Description | Concepts | Activity | Material |
---|---|---|---|---|
5 | Brief of the tasks to be conducted | Introduction | Lecture | |
5 | Generating a two-dimensional dataset | Gaussian noise, np.random.randn() | Coding | Jupyter notebook |
10 | Fitting and evaluating a Decision Tree | scikit-learn | Coding | |
15 | Investigating the effect of the model complexity parameter | model complexity, support vectors, margin, plotting | Documentation | |
5 | Fitting the Model | Model Fitting | Coding | |
15 | Evaluate and Investigatie the effect of the parameter | Parameters Evaluation | Documentation | |
20 | Implementing a custom precomputed Model | matrix operations in numpy | Coding | |
45 | Fitting and evaluating the model on real data | data preprocessing (scaling), Accuracy, Confusion Matrix, Cross Validation | Documentation |
Acknowledgements
The Human-Centered AI Masters programme was Co-Financed by the Connecting Europe Facility of the European Union Under Grant №CEF-TC-2020-1 Digital Skills 2020-EU-IA-0068.