P.S.: Part of this code was provided as a template during the course 10601 (Introduction to Machine Learning) at CMU.