Skip to content

Commit ebdabf1

Browse files
committed
[SYSTEMDS-3898] Fix robustness quantile/iqr with averaging
This patch fixes the quantile value-pick kernel for the case with averaging which ran into out-of-bounds exceptions for instances of outlierByIQR because the kernel was not robust against quantiles at extreme boundaries values.
1 parent 3ae6a77 commit ebdabf1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/java/org/apache/sysds/runtime/matrix/data/MatrixBlock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4804,7 +4804,7 @@ public double pickValue(double quantile, boolean average) {
48044804

48054805
if ( get(i,1) != 0 ) {
48064806
// i^th value is present in the data set, simply return it
4807-
if ( average ) {
4807+
if ( average && pos < getNumRows()-1 ) {
48084808
if(pos < t) {
48094809
return get(i,0);
48104810
}

0 commit comments

Comments
 (0)