Fix theoretical bug
This commit is contained in:
parent
d8e52ecd82
commit
77ec780304
1 changed files with 2 additions and 2 deletions
|
@ -70,7 +70,7 @@ public abstract class CompetingRiskGroupDifferentiator<Y extends CompetingRiskRe
|
||||||
|
|
||||||
final Double score = getScore(competingRiskSets);
|
final Double score = getScore(competingRiskSets);
|
||||||
|
|
||||||
if(Double.isFinite(score) && (bestScore == null || score > bestScore)){
|
if(score != null && !Double.isNaN(score) && Double.isFinite(score) && (bestScore == null || score > bestScore)){
|
||||||
bestScore = score;
|
bestScore = score;
|
||||||
bestSplit = candidateSplit;
|
bestSplit = candidateSplit;
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ public abstract class CompetingRiskGroupDifferentiator<Y extends CompetingRiskRe
|
||||||
|
|
||||||
final Double score = getScore(competingRiskSets);
|
final Double score = getScore(competingRiskSets);
|
||||||
|
|
||||||
if(Double.isFinite(score) && (bestScore == null || score > bestScore)){
|
if(score != null && !Double.isNaN(score) && Double.isFinite(score) && (bestScore == null || score > bestScore)){
|
||||||
bestScore = score;
|
bestScore = score;
|
||||||
bestSplit = splitRuleUpdater.currentSplit();
|
bestSplit = splitRuleUpdater.currentSplit();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue