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

Method classify

JSAT/src/jsat/classifiers/linear/ROMMA.java:196–208  ·  view source on GitHub ↗
(DataPoint data)

Source from the content-addressed store, hash-verified

194 }
195
196 @Override
197 public CategoricalResults classify(DataPoint data)
198 {
199 if(w == null)
200 throw new UntrainedModelException("Model has not been trained");
201 double wx = getScore(data);
202 CategoricalResults cr = new CategoricalResults(2);
203 if(wx < 0)
204 cr.setProb(0, 1.0);
205 else
206 cr.setProb(1, 1.0);
207 return cr;
208 }
209
210 @Override
211 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