Refactored logistic_regression.
Now uses same format as RBM
- prepare_functions(),train(),fit(),cost_updates()
- t_predict()
- Uses patience and best error for training