From 77ec78030421f65f560539c4e5bd481654bbb782 Mon Sep 17 00:00:00 2001 From: Joel Therrien Date: Mon, 28 Jan 2019 11:45:06 -0800 Subject: [PATCH] Fix theoretical bug --- .../differentiator/CompetingRiskGroupDifferentiator.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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(); }