@Test public void completeJobToyExample() throws Exception { explicitExample(1); }
@Before @Override public void setUp() throws Exception { super.setUp(); inputFile = getTestTempFile("prefs.txt"); intermediateDir = getTestTempDir("intermediate"); intermediateDir.delete(); outputDir = getTestTempDir("output"); outputDir.delete(); tmpDir = getTestTempDir("tmp"); conf = getConfiguration(); // reset as we run all tests in the same JVM SharingMapper.reset(); }
@Test public void completeJobImplicitToyExampleMultithreaded() throws Exception { implicitExample(2); }
new DenseVector(new double[] { 3.0, na, na, 5.0 }) }); writeLines(inputFile, preferencesAsText(preferences)); log.info("RMSE: {}", rmse); assertTrue(rmse < 0.2);
"6839920411763636962,706816485922781596,5.0" }; writeLines(inputFile, preferencesWithLongIDs); double lambda = 0.065; Configuration conf = getConfiguration(); "--usesLongIDs", String.valueOf(true) }); assertEquals(0, success); "--output", outputDir.getAbsolutePath() }); assertEquals(0, success);
"6839920411763636962,706816485922781596,5.0" }; writeLines(inputFile, preferencesWithLongIDs); assertEquals(4, userIDIndex.size()); assertEquals(4, itemIDIndex.size()); MathHelper.readMatrixRows(conf, new Path(outputDir.getAbsolutePath(), "M/part-m-00000")); assertEquals(4, u.size()); assertEquals(4, m.size()); log.info("RMSE: {}", rmse); assertTrue(rmse < 0.2);
new DenseVector(new double[] { 1.0, 0, 0, 1.0 }) }); writeLines(inputFile, preferencesAsText(observations)); log.info("RMSE: {}", rmse); assertTrue(rmse < 0.4);
@Test public void completeJobImplicitToyExample() throws Exception { implicitExample(1); }
@Test public void completeJobToyExampleMultithreaded() throws Exception { explicitExample(2); }