Skip to content

Commit 290ef4f

Browse files
committed
fix bug in decision stump using wrong value for number of classes
1 parent 5412a2d commit 290ef4f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

JSAT/src/jsat/classifiers/trees/DecisionStump.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ public List<List<DataPointPair<Integer>>> trainC(List<DataPointPair<Integer>> da
394394
aSplit = listOfLists(catAttributes[attribute].getNumOfCategories());
395395
split_scores = new ImpurityScore[aSplit.size()];
396396
for(int i=0; i < split_scores.length; i++)
397-
split_scores[i] = new ImpurityScore(aSplit.size(), gainMethod);
397+
split_scores[i] = new ImpurityScore(predicting.getNumOfCategories(), gainMethod);
398398

399399
List<DataPointPair<Integer>> wasMissing = new ArrayList<DataPointPair<Integer>>(0);
400400
double missingSum = 0.0;

0 commit comments

Comments
 (0)