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

Method classify

JSAT/src/jsat/classifiers/linear/ALMA2.java:202–214  ·  view source on GitHub ↗
(DataPoint data)

Source from the content-addressed store, hash-verified

200 }
201
202 @Override
203 public CategoricalResults classify(DataPoint data)
204 {
205 if(w == null)
206 throw new UntrainedModelException("The model has not yet been trained");
207 double wx = getScore(data);
208 CategoricalResults cr =new CategoricalResults(2);
209 if(wx < 0)
210 cr.setProb(0, 1.0);
211 else
212 cr.setProb(1, 1.0);
213 return cr;
214 }
215
216 @Override
217 public double getScore(DataPoint dp)

Callers 1

testTrain_CMethod · 0.95

Calls 2

getScoreMethod · 0.95
setProbMethod · 0.95

Tested by 1

testTrain_CMethod · 0.76