Code style fixes.
Added cost function for logistic regression.
Got rid of redundant transpose.
Vectorized gradient loop in cost_function