TDA233 / DIT382 Algorithms for machine learning and inference