mimno / Mallet

MALLET is a Java-based package for statistical natural language processing, document classification, clustering, topic modeling, information extraction, and other machine learning applications to text.
https://mimno.github.io/Mallet/
Other
984 stars 344 forks source link

Score normalization error in AdaBoost and AdaBoostM2 #172

Open pkyj95 opened 4 years ago

pkyj95 commented 4 years ago

sum is not the sum of the numWeakClassifiersToUse scores in: for (int round = 0; round < numWeakClassifiersToUse; round++) { bestIndex = weakClassifiers[round].classify(inst).getLabeling().getBestIndex(); scores[bestIndex] += alphas[round]; sum += scores[bestIndex]; }

Sum should be:

sum = 0; for (int i==; i < scores.length; i++) sum +=scores[i];