diff options
author | John Langford <jl@hunch.net> | 2009-11-30 03:05:22 +0300 |
---|---|---|
committer | John Langford <jl@hunch.net> | 2009-11-30 03:05:22 +0300 |
commit | 5fb933bf036233a70d7504f585dfcfe003c40bf1 (patch) | |
tree | 300682a6d936ba062956a914093e87ac61f7acea /loss_functions.cc | |
parent | fedec17048f8a424df36fd291adedd812e11dca6 (diff) | |
parent | b42ec663ec10651d3c2d97efb2dd7358dc874252 (diff) |
fixed merge with printing patch
Diffstat (limited to 'loss_functions.cc')
-rw-r--r-- | loss_functions.cc | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/loss_functions.cc b/loss_functions.cc index e7da79a3..9428a9de 100644 --- a/loss_functions.cc +++ b/loss_functions.cc @@ -30,8 +30,7 @@ public: } double getLoss(double prediction, double label) { - double y = (label == 0.0) ? -1.0 : 1.0; - double e = 1 - y*prediction; + double e = 1 - label*prediction; return (e > 0) ? e : 0; } |