add weight to balance error from both negative and positive samples
clean code
Merge branch 'feature_error_ratio' into development