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

Method testTrain_C

JSAT/test/jsat/classifiers/linear/ALMA2Test.java:52–69  ·  view source on GitHub ↗

Test of classify method, of class ALMA2.

()

Source from the content-addressed store, hash-verified

50 * Test of classify method, of class ALMA2.
51 */
52 @Test
53 public void testTrain_C()
54 {
55 System.out.println("classify");
56
57 ClassificationDataSet train = FixedProblems.get2ClassLinear(200, RandomUtil.getRandom());
58
59 ALMA2 alma = new ALMA2();
60 alma.setEpochs(1);
61
62 alma.trainC(train);
63
64 ClassificationDataSet test = FixedProblems.get2ClassLinear(200, RandomUtil.getRandom());
65
66 for(DataPointPair<Integer> dpp : test.getAsDPPList())
67 assertEquals(dpp.getPair().longValue(), alma.classify(dpp.getDataPoint()).mostLikely());
68
69 }
70
71}

Callers

nothing calls this directly

Calls 9

get2ClassLinearMethod · 0.95
getRandomMethod · 0.95
getAsDPPListMethod · 0.95
classifyMethod · 0.95
mostLikelyMethod · 0.80
trainCMethod · 0.65
setEpochsMethod · 0.45
getPairMethod · 0.45
getDataPointMethod · 0.45

Tested by

no test coverage detected