Homework 4B for CIS 520 Machine Learning at University of Pennsylvania