Extract method on logistic cost function. Want to try using other cost functions. e.g. squared loss.
fing bull. cost gradient? completely fed