PDA

View Full Version : bug in Instances::kthSmallestValue(int attIndex, int k)



haiyeong
07-01-2008, 10:38 AM
The value "k" should be 1-based index rather than 0-based. Following change could fix the bug in weka-3.5.6.

change


if ((k < 0) || (k > j)) {
throw new IllegalArgumentException("...");
}
to



if ((k <= 0) || (k > j + 1)) {
throw new IllegalArgumentException("...");
}

Mark
07-01-2008, 09:44 PM
Hi there,

This got fixed in 3.5.7.

Cheers,
Mark.