From 290ef4ff11135a38326e2c8ddc47445bb2c7bbd8 Mon Sep 17 00:00:00 2001 From: EdwardRaff Date: Tue, 1 Mar 2016 23:29:52 -0500 Subject: [PATCH] fix bug in decision stump using wrong value for number of classes --- JSAT/src/jsat/classifiers/trees/DecisionStump.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/JSAT/src/jsat/classifiers/trees/DecisionStump.java b/JSAT/src/jsat/classifiers/trees/DecisionStump.java index 5aa0b0f9..242ffd39 100644 --- a/JSAT/src/jsat/classifiers/trees/DecisionStump.java +++ b/JSAT/src/jsat/classifiers/trees/DecisionStump.java @@ -394,7 +394,7 @@ public List>> trainC(List> da aSplit = listOfLists(catAttributes[attribute].getNumOfCategories()); split_scores = new ImpurityScore[aSplit.size()]; for(int i=0; i < split_scores.length; i++) - split_scores[i] = new ImpurityScore(aSplit.size(), gainMethod); + split_scores[i] = new ImpurityScore(predicting.getNumOfCategories(), gainMethod); List> wasMissing = new ArrayList>(0); double missingSum = 0.0;