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

Method classify

JSAT/src/jsat/classifiers/linear/SCW.java:426–438  ·  view source on GitHub ↗
(DataPoint data)

Source from the content-addressed store, hash-verified

424 }
425
426 @Override
427 public CategoricalResults classify(DataPoint data)
428 {
429 if(w == null)
430 throw new UntrainedModelException("Model has not yet ben trained");
431 CategoricalResults cr = new CategoricalResults(2);
432 double score = getScore(data);
433 if(score < 0)
434 cr.setProb(0, 1.0);
435 else
436 cr.setProb(1, 1.0);
437 return cr;
438 }
439
440 @Override
441 public double getScore(DataPoint dp)

Callers 2

testTrainC_FullMethod · 0.95
testTrainC_DiagMethod · 0.95

Calls 2

getScoreMethod · 0.95
setProbMethod · 0.95

Tested by 2

testTrainC_FullMethod · 0.76
testTrainC_DiagMethod · 0.76