ex2-3 logistic costFunction done