costFunction and gradient in case of logistic regression
Added assignments