Skip to content

Commit

Permalink
bug fix for NaN giving silly values
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardRaff committed May 31, 2016
1 parent 4b19445 commit e133759
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion JSAT/src/jsat/classifiers/trees/DecisionStump.java
Original file line number Diff line number Diff line change
Expand Up @@ -911,7 +911,7 @@ else if(i > DPs.size()-minResultSplitSize-nans)
thisSplitSqrdErr = Double.NEGATIVE_INFINITY;
}
//Now compare what weve done
if(thisSplitSqrdErr < lowestSplitSqrdError.get())
if(thisSplitSqrdErr >= 0 && thisSplitSqrdErr < lowestSplitSqrdError.get())//how did we get -Inf?
{
synchronized(bestSplit)
{
Expand Down
2 changes: 1 addition & 1 deletion JSAT/test/jsat/classifiers/trees/RandomForestTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ public void testClone()
RandomForest instance = new RandomForest();

ClassificationDataSet t1 = FixedProblems.getSimpleKClassLinear(100, 3);
ClassificationDataSet t2 = FixedProblems.getSimpleKClassLinear(100, 6);
ClassificationDataSet t2 = FixedProblems.getSimpleKClassLinear(100, 4);
if(useCatFeatures)
{
t1.applyTransform(new NumericalToHistogram(t1));
Expand Down

0 comments on commit e133759

Please sign in to comment.