Pattern Recognition exercise from C. Bishop