MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / classify

Method classify

JSAT/src/jsat/classifiers/boosting/SAMME.java:54–66  ·  view source on GitHub ↗
(DataPoint data)

Source from the content-addressed store, hash-verified

52 }
53
54 @Override
55 public CategoricalResults classify(DataPoint data)
56 {
57 if(predicting == null)
58 throw new RuntimeException("Classifier has not been trained yet");
59 CategoricalResults cr = new CategoricalResults(predicting.getNumOfCategories());
60
61 for(int i=0; i < hypoths.size(); i++)
62 cr.incProb(hypoths.get(i).classify(data).mostLikely(), hypWeights.get(i));
63
64 cr.normalize();
65 return cr;
66 }
67
68 /**
69 *

Callers 1

testCloneMethod · 0.95

Calls 7

incProbMethod · 0.95
normalizeMethod · 0.95
getNumOfCategoriesMethod · 0.80
mostLikelyMethod · 0.80
sizeMethod · 0.65
classifyMethod · 0.65
getMethod · 0.45

Tested by 1

testCloneMethod · 0.76