yinlou / mltk

Machine Learning Tool Kit
BSD 3-Clause "New" or "Revised" License
136 stars 74 forks source link

Typo in DoublePairComparator #6

Closed sds-dubois closed 8 years ago

sds-dubois commented 8 years ago

My guess is that it does not create a bug, but there is a typo in the function compare in DoublePairComparator in mltk.predictor.evaluation.AUC. You wrote:

int cmp = Double.compare(o1.v1, o2.v1);
if (cmp == 0) {
    cmp = Double.compare(o2.v2, o2.v2);
}

but the second comparison should be Double.compare(o1.v2, o2.v2).

yinlou commented 8 years ago

Thank you! That's a good catch. I just fixed that.