My homework in machine learning class