diff --git a/src/main/java/ca/joeltherrien/randomforest/responses/competingrisk/differentiator/CompetingRiskGroupDifferentiator.java b/src/main/java/ca/joeltherrien/randomforest/responses/competingrisk/differentiator/CompetingRiskGroupDifferentiator.java index 9da97b4..aef9b4c 100644 --- a/src/main/java/ca/joeltherrien/randomforest/responses/competingrisk/differentiator/CompetingRiskGroupDifferentiator.java +++ b/src/main/java/ca/joeltherrien/randomforest/responses/competingrisk/differentiator/CompetingRiskGroupDifferentiator.java @@ -70,7 +70,7 @@ public abstract class CompetingRiskGroupDifferentiator bestScore)){ + if(score != null && !Double.isNaN(score) && Double.isFinite(score) && (bestScore == null || score > bestScore)){ bestScore = score; bestSplit = candidateSplit; } @@ -102,7 +102,7 @@ public abstract class CompetingRiskGroupDifferentiator bestScore)){ + if(score != null && !Double.isNaN(score) && Double.isFinite(score) && (bestScore == null || score > bestScore)){ bestScore = score; bestSplit = splitRuleUpdater.currentSplit(); }