https://www.brokenprogrammers.com/nptel-introduction-to-machine-learning-assignment-3-answers/