Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Langford <jl@hunch.net>2009-11-30 03:05:22 +0300
committerJohn Langford <jl@hunch.net>2009-11-30 03:05:22 +0300
commit5fb933bf036233a70d7504f585dfcfe003c40bf1 (patch)
tree300682a6d936ba062956a914093e87ac61f7acea /loss_functions.cc
parentfedec17048f8a424df36fd291adedd812e11dca6 (diff)
parentb42ec663ec10651d3c2d97efb2dd7358dc874252 (diff)
fixed merge with printing patch
Diffstat (limited to 'loss_functions.cc')
-rw-r--r--loss_functions.cc3
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;
}