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

Method testTrainC_Diag

JSAT/test/jsat/classifiers/linear/SCWTest.java:65–81  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

63 }
64
65 @Test
66 public void testTrainC_Diag()
67 {
68 System.out.println("TrainC_Diag");
69 ClassificationDataSet train = FixedProblems.get2ClassLinear(200, RandomUtil.getRandom());
70
71 ClassificationDataSet test = FixedProblems.get2ClassLinear(200, RandomUtil.getRandom());
72
73 for (SCW.Mode mode : SCW.Mode.values())
74 {
75 SCW scwDiag = new SCW(0.9, mode, true);
76 scwDiag.trainC(train);
77
78 for (DataPointPair<Integer> dpp : test.getAsDPPList())
79 assertEquals(dpp.getPair().longValue(), scwDiag.classify(dpp.getDataPoint()).mostLikely());
80 }
81 }
82}

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected