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