machine learning exercises (Andrew Ng)