Fix equations in NHERD update

Add hinge loss function as in the original paper for safety
Remove unnecessary std::max
Merge pull request #47 from hido/fix-816

Fix equations in classifier/NHERD update