Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Exercises: The Journey Continues

The lectures may end, but the actual learning starts when you actually make your hand dirty by sit down with a notebook, make a few mistakes, fix them, and try again.

The exercises below are designed to give you a more hands-on experience with the ideas discussed in this mini course. Each worksheet follows a fairly direct path: understand the data, prepare it, apply the relevant machine-learning ideas, and finally judge what the model has learned.

The three exercises

There are three independent exercise notebooks covering supervised learning, deep learning, and unsupervised learning. You may start with whichever one interests you most, although the Supervised Machine Learning exercise is probably the most natural place to begin.

1. Supervised Machine Learning — Palmer Penguins

This exercise uses the Palmer Penguins dataset and walks through several of the ideas introduced during the course:

  • preparing and understanding the data,

  • Decision Trees,

  • Support Vector Machines,

  • Gradient Descent,

  • a simple Neural Network,

  • and evaluating how well a model performs.

Open in Colab

Download the notebook

2. Deep Learning

This exercise moves towards deep learning using small datasets that are easy to run on a laptop or in Colab. It explores ideas including:

  • convolution,

  • Convolutional Neural Networks (CNNs),

  • tokens,

  • word order,

  • and self-attention.

The image part uses the small digit dataset available through scikit-learn, so you do not need to download a large external dataset.

Open in Colab

Download the notebook

3. Unsupervised Machine Learning — Wine Dataset

Here the labels take a step back and we ask the machine to look for structure in the data itself.

Using the Wine dataset, you will explore:

  • kk-means clustering,

  • how to choose the number of clusters,

  • Principal Component Analysis (PCA),

  • and ways of evaluating the resulting clusters.

Open in Colab

Download the notebook


The Kaggle Challenge

Once you have played with the individual exercises, there is one more challenge waiting for you.

As part of this mini course, we will also have a Kaggle exercise/competition, prepared and coordinated by Aashirvaad Bajpai.

You can find the Kaggle page invitation here:

Open the Kaggle Challenge

Unlike the earlier exercises, here we do not necessarily want to tell you exactly which machine-learning model to use. You have now seen several possibilities during the course — the choice of how to approach the problem is part of the exercise.

Why do this?

Because this is much closer to what happens in a real machine-learning problem. It is easy to build a model that performs beautifully on data you have already looked at. The real question is:

Does the model generalize to genuinely unseen data?

This is exactly why, throughout this course, we have repeatedly separated training, validation, and testing.

The Kaggle challenge is therefore not simply about obtaining the highest score. Use it to think about questions such as:

  • How should I split and validate the data available to me?

  • Am I overfitting?

  • Which input features are actually useful?

  • Does a more complicated model really perform better?

  • How much should I tune my model before I start tuning to statistical fluctuations?

  • Most importantly: will my model survive the journey into the unseen test set?

Details of the submission procedure and final evaluation will be provided through the Kaggle page during the course.


What should you submit?

Once the course is over, you will have two weeks to complete the exercises and, if you would like to contribute your work back to the course, submit it through GitHub.

The course repository contain a folder called

Solutions/

Which is empty as of now. Inside that folder, create one folder with your name. For example,

Solutions/
└── Your_Name/
    ├── supervised_penguins_student.ipynb
    ├── deep_learning_student.ipynb
    └── unsupervised_wine_student.ipynb

Put your completed exercise notebooks inside your own folder.

You do not have to rename the notebooks. Keeping the original filenames will make them easier to compare and review.

You may also introduce yourself

This part is optional, but encouraged.

Inside your personal solution folder, you may create a small README.md, for example:

Solutions/
└── Your_Name/
    ├── README.md
    ├── supervised_penguins_student.ipynb
    ├── deep_learning_student.ipynb
    └── unsupervised_wine_student.ipynb

In the README.md, you may write a few lines about yourself, such as:

# Your Name

I am a graduate student / researcher / undergraduate student working on ...

My current research interests are ...

I attended the HSF Machine Learning mini course in ...

3 things I am good at ...

3 things I am bad at ...

I am looking forward to ...

Please include only information that you are comfortable making public on GitHub.

How to submit your work through a Pull Request

Do not worry if you have never made a Pull Request before. That is also part of the exercise.

Step 1: Fork the repository

Go to

https://github.com/chattopadhyayA/ml_course

and click Fork.

This creates your own copy of the course repository under your GitHub account.

Step 2: Clone your fork

Copy the HTTPS address of your fork and clone it to your computer:

git clone https://github.com/YOUR_GITHUB_USERNAME/ml_course.git
cd ml_course

Step 3: Create a new branch

It is good practice not to work directly on main.

Create a branch for your submission:

git checkout -b solutions-YOUR_NAME

For example:

git checkout -b solutions-frodo-baggins

Step 4: Create your folder

Create your personal folder inside Solutions/:

mkdir -p Solutions/Your_Name

Copy your completed notebooks into that folder. You may also add your optional README.md.

Step 5: Add and commit your work

Check what Git sees:

git status

Then add your folder:

git add Solutions/Your_Name

Commit it:

git commit -m "Add exercise solutions by Your Name"

Step 6: Push your branch

git push -u origin solutions-YOUR_NAME

Step 7: Open the Pull Request

GitHub will normally show a button such as Compare & pull request after you push your branch.

Open a Pull Request from your branch into the main branch of

chattopadhyayA/ml_course

In the Pull Request message, briefly tell us:

  • your name,

  • which exercises you completed,

  • and anything interesting you learned, changed, or struggled with.

Becoming part of the course

After the submission period, I will review the contributions. Participant solutions that are merged into the repository will also allow me to include the participants’ names on the course webpage as contributors.

So your exercise need not simply disappear into an instructor’s inbox after the course. It can become part of the course itself.

A few weeks after the course, the reference solutions will also be made available so that you can compare your approach with the intended solution.

And with that, the fellowship leaves the lecture hall and heads into the wild.

Good luck, and may your losses decrease monotonically.