6.9 KiB
Machine Learning Exercises
This repository contains the exercises accompanying the theory from my machine learning book.
If you have any questions, please send me an email.
Have fun!
Using Python
The programming exercises are written in Python. If you're unfamiliar with Python, you should work through this tutorial at the beginning of the course.
Using Python on your own computer
The Python tutorial includes some notes on how to install Python and Jupyter Notebook on your own computer.
Please make sure you're using Python 3 and all libraries listed in the requirements.txt file are installed and up to date. You can verify this with the test_installation.ipynb notebook.
Using Google Colab
If you have a Google account, you can also run the code in the cloud using Google Colab:
While Google Colab already includes most packages that we need, should you require an additional library (e.g., skorch for training PyTorch neural networks in notebook 5), you can install a package by executing !pip install package in a notebook cell. With Colab, it is also possible to run code on a GPU, but this has to be manually selected.
Course Overview
For an optimal learning experience, the chapters from the machine learning book should be interleaved with quizzes and programming exercises as shown below. Additionally, you should take notes in the workbook while working through the materials.
Important: Please make a note of all questions that arise while working through the materials. At the beginning of each group session, we'll collect everyone's questions and discuss them.
You can also find the course syllabus on the last page of the course description, which explicitly lists the sections of the book for each block.
Part 1: Getting started: What is ML?
Block 1.1:
- Read the whole chapter: "Introduction"
- Answer Quiz 1 (quizzes are also available in PDF form in the folder "other" in case you can't access Google Forms)
Block 1.2:
- Read the whole chapter: "ML with Python"
- Install Python on your computer and complete the Python tutorial
Block 1.3:
- Read the whole chapter: "Data & Preprocessing"
- Answer Quiz 2
Block 1.4:
- Read the whole chapter "ML Solutions: Overview"
- Answer Quiz 3
- Prepare a 90-second Spotlight presentation for one of the given ML use cases
Part 2: Your first algorithms
Block 2.1:
- Read the whole chapter: "Unsupervised Learning"
- Work through Notebook 1: visualize text (after the section on dimensionality reduction)
- Work through Notebook 2: image quantization (after the section on clustering)
Block 2.2:
- Read the chapter "Supervised Learning Basics"
- Answer Quiz 4
Part 3: Advanced models
Block 3.1:
- Read the chapter "Supervised Learning Models"
- In parallel, work through the respective sections of Notebook 3: supervised comparison
Block 3.2:
- Start reading the chapter "Deep Learning & more" up to and including the section: "Information Retrieval (Similarity Search)" and refresh your memory about TF-IDF feature vectors and the cosine similarity
- Work through Notebook 4: information retrieval
Block 3.3:
- Read the section: "Deep Learning (Neural Networks)"
- Work through Notebook 5: MNIST with torch (recommended) or MNIST with keras (in case others in your organization are already working with TensorFlow)
Block 3.4:
- Read the last sections of the chapter "Deep Learning & more": "Time Series Forecasting" and "Recommender Systems (Pairwise Data)"
Part 4: Avoiding common pitfalls
Block 4.1:
- Read the whole chapter: "Avoiding Common Pitfalls"
Block 4.2:
- Work through Notebook 6: analyze toy dataset
- Have a look at the cheat sheet, which includes a summary of the most important steps when developing a machine learning solution, incl. code snippets
Block 4.3:
- Case Study! Work through Notebook 7: predicting hard drive failures (plan at least 5 hours for this!)
Part 5: RL & Conclusion
Block 5.1:
- Read the whole chapter: "Reinforcement Learning"
- Work through Notebook 8: RL gridmove
Block 5.2:
- Answer Quiz 5
- Read the whole chapter: "Conclusion"
- Complete the exercise: "Your next ML Project" (in case you need some inspiration for a project idea, have a look at how ML could be used to fight climate change). Feel free to prepare a few slides or use the Word template and aim for a 5 minute presentation.
- Please fill out the Feedback Survey to help me further improve this course! :-)