costFunctionReg(), calculating the cost function with regularization of the parameters, implemented -- all required parts of assignment complete