2nd Assignment

This is not just a programming assignment, you will also be evaluated by the machine learning options you take. You should submit the code and a report including the description of your approach, the results you obtained (train, validation, test) and the number of steps needed to train each neural network. This assignment may be done individually or in groups of two elements. Grades are given individually after the discussion of the submited work.

1st part: Transfer learning - (7/20)

Train a neuralnetwork model on the MNIST dataset (digits).
Use the same model, except for the output layer, to recognize handwritten letters. The given training(and validation) set is very small (520 examples for 26 letters, upper and lower case). A large test set of letters is provided.
Compare the results of using transfer learning with learning all the weights from scratch on the training set.
You should choose a model that achieves at least 70% accuracy on the letters test set.
Train and Test data

2nd parte: Time series (ECG) - (13/20)

Your task is to create QRS detectors ( see the introduction of this classical paper) using neuralnetworks.
You must build two models: one using a feedforward neural network and another using a recurrent neural network. Use a similar number of parameters on both models.
Your trainig data must be the INCART dataset and you must evaluate your QRS detectors on the mitbih Arrhythmia dataset.
You detector may use one or two ECG channels(two is better). The python software package wfdb(see available documentation) will be necessary to read, preprocess and posprocess the signals.

Some more details on your task

Preprocessing: the signals on the two databases have different sampling frequencies. You will need to change the signal and annotations sampling frequencies in at least one of the databases. You may use some of the functions: 'wfdb.processing.resample_singlechan', 'wfdb.processing.resample_multichan', 'wfdb.processing.resample_ann', 'wfdb.processing.resample_sig'.
Posprocessing: your detector must produce a numpy array with the QRS locations (samples). That numpy array will be given to the function 'wfdb.wrann' that will produce a file wich will be read by 'wfdb.processing.compare_annotations', in order to evaluate the accuracy of your QRS detector.
The function 'wfdb.processing.find_local_peaks' might be useful to help producing the array of QRS locations from the output of your neural network.