Imported from https://github.com/MatteoZambra/SM_ML__MScThesis
