Hello. 2020-03-07 14:50 UTC+01:00, chentao...@qq.com <chentao...@qq.com>: > Hi, > >>> > [...] >>> Solution 3 is "ClusterRanking". >>> In cases where the reference algorithm would assume the >>> other convention (i.e. "lower is better"), the implementation >>> is required to apply a conversion (e.g. return the opposite). >> >>s/opposite/inverse/ >> >>[We should probably enforce that ranking is positive.] >> > > How do we trade this situation with different rank rules(lower is better, or > higher is better): > ```java > if (evaluator.isBetterScore(varianceSum, bestVarianceSum)) { > // this one is the best we have found so far, remember it > best = clusters; > bestVarianceSum = varianceSum; > } > ```
I propose that the new API forbids alternative interpretations of the "score". Higher will always mean better. I've just sent another post for discussing enhancements to the clustering API. The functional interface presented earlier is the first topic in that other thread; let's discuss further over there. Regards, Gilles --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@commons.apache.org For additional commands, e-mail: dev-h...@commons.apache.org