The 2nd task on Advanced Machine Learning course (academic year 2013)