Midterm 3 (2024)
Assignment Rules and Execution
The third midterm covers the deep learning techniques up to Lecture 23. To pass the midterm you should
- perform one (only one) of the assignments described in the following;
- report your results as a Colab notebook or a 10 slide presentation (both versions are equally fine) and upload it here by the (strict) deadline;
In case you are delivering a Colab notebook, please upload a txt file with the link to your Colab notebook (already ran).
You can use library functions to perform the analysis unless explicitly indicated.
You can use whatever programming language you like,
but I strongly suggest to use either Python or Matlab for which you have
coding
examples. Python will further allow you to deliver your midterm as a
Colab notebook, but this is not a requirement (you can deliver a
presentation instead).
Your report (irrespectively of whether it is a notebook or a presentation) needs to cover at least the following aspects (different assignments might have different additional requirements):
- A title with the assignment number and
your name
- The full code to run your analysis (for Colabs) or a few slides (for presentations) with code snippets highlighting the key
aspects of your code
- A section reporting results of the analysis and your brief comments on it
- A final section with your personal considerations (fun things, weak aspects, possible ways to enhance the analysis, etc.).
Do not waste time and space to describe the dataset or the
assignment you are solving as we will all be already informed on it.
DATASET (MNIST): http://yann.lecun.com/exdb/mnist/
Train 1 denoising and 1 contractive autoencoder on the MNIST dataset. It is up to you to decide how many layers and neurons in each layer and how many layers you want in the deep autoencoder. Show an accuracy comparison between the different autoencoders.
Then, experiment with what happens if you
feed the autoencoders with a random noise image and then you
apply the iterative gradient ascent process described in the lecture to
see if the reconstruction converges to the data manifold. Confront the reconstructions created by the 2 different models and comment on the results.
Assignment 2
DATASET (HORSES): www.kaggle.com/datasets/ztaihong/weizmann-horse-database/data
Implement your own convolutional network to solve problem of horse semantic segmentation from the background in the Horses Dataset. Choose your favourite convolutional-type architecture to solve the problem and motivate your choice. The design decisions about how many layers, the type of layers and how they are interleaved, the type of pooling, the use of residual connections, etc. are also on you. Train and validate the model on the data as appropriate in Machine Learning an provide a measure of segmentation accuracy.
Assignment 3
DATASET (AIR QUALITY): https://archive.ics.uci.edu/dataset/360/air+quality
Train a neural network for sequences of your choice (LSTM, GRU, Convolutional, Clockwork RNN, ...) to predict the Benzene (C6H6 column) based on the sensor measurements timeseries (PT08.* columns) being fed in input to the recurrent model. Evaluate the predictive accuracy of the network on the task (using appropriately training/validation splits). Confront the perfomance of this model, with another recurrent neural network trained to predict benzene one-step-ahead, i.e. given the current benzene measuement, predict its next value.
Show and compare performance of both settings.
Assignment 4
DATASET (Airline reviews) -https://www.kaggle.com/datasets/khushipitroda/airline-reviews
Pick up one of the available implementations of the Char-RNN (e.g. , implement1,
implement2, implement3, implement4, etc.) and train it on the "Review" column of the dataset, which contain short texts describing a travel experience with an airline. Try experimenting with different configurations of the CHAR-RNN, varying the number of layers. Since the dataset is not large scale, keep the number of hidden neurons contained and apply dropout as needed. Use the trained model (the best or the worst, your choice) to generate new reviews and create your personal Automated Flight Complainer.
The softmax has a temperature parameter T that you can use to control the randomness of the output distribution (i.e. output logits are divided by T). Experiment with different values of T and comment the results.
Assignment 5
DATASET (Airline reviews) -https://www.kaggle.com/datasets/khushipitroda/airline-reviews
The dataset contains text of online travel reviews (in Column Review) with an associated Rating (column Overall_Rating). The objective is to train a classifier to predict the rating from the Review text. You are free to choose the model's architecture, but you should describe and justify your design choices. Train the model and assess it as appropriate in machine learning. You are allowed to preprocess the data however you want (e.g. using pretrained embeddings, dropping some features, just a bag-of-words), but the predictive model must be trained by yourself from scratch (no pretrained predictor).