Machine Learning exercise 4, nnCostFunction