Skip to content

Commit

Permalink
Fix survfit logic when there are no numeric predictors.
Browse files Browse the repository at this point in the history
  • Loading branch information
aboyoun committed Oct 23, 2014
1 parent eb1b1f2 commit 110db53
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/hex/CoxPH.java
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ protected float[] score0(double[] data, float[] preds) {
}
for (int j = n_cats; j < n_data; ++j)
numsHasNA |= Double.isNaN(data[j]);
if (numsHasNA || (catsHasNA && !catsAllNA) || (n_num == 0 && catsAllNA)) {
if (numsHasNA || (catsHasNA && !catsAllNA) || (n_num > 0 && catsAllNA)) {
for (int i = 1; i <= 2 * n_time; ++i)
preds[i] = Float.NaN;
} else {
Expand Down

0 comments on commit 110db53

Please sign in to comment.