Commit 8aa15e88 authored by Guolin Ke's avatar Guolin Ke
Browse files

fix bug in multi_error

parent db18367e
......@@ -101,11 +101,11 @@ public:
inline static score_t LossOnPoint(float label, std::vector<double> score) {
size_t k = static_cast<size_t>(label);
for (size_t i = 0; i < score.size(); ++i){
if (i != k && score[i] > score[k]) {
return 0.0f;
if (i != k && score[i] >= score[k]) {
return 1.0f;
}
}
return 1.0f;
return 0.0f;
}
inline static const char* Name() {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment