@Test public void testValidation() { DataModelIF<Long, Long> dm = DataModelFactory.getDefaultModel(); for (long u = 1L; u <= USERS; u++) { for (long i = 1L; i <= ITEMS; i++) { dm.addPreference(u, i, 1.0 * u * i); } } DataModelIF<Long, Long>[] splits = new ValidationSplitter<>(new RandomSplitter<Long, Long>(0.8f, false, 1L, false)).split(dm); assertTrue(splits.length == 3); long userTest = -1; long itemTest = -1; for (Long user : splits[1].getUsers()) { userTest = user; for (Long i : splits[1].getUserItems(user)) { itemTest = i; break; } break; } assertTrue(Double.isNaN(splits[0].getUserItemPreference(userTest, itemTest))); }
private Split() { }
Split { private Split() { } }
Split { private Split() { } private  Split(); }
Split { private Split() { } private  Split(); static void main(final String[] args); }
Split { private Split() { } private  Split(); static void main(final String[] args);  }