final void setupSharedInstance(Context context) throws IOException { if (SHARED_INSTANCE == null) { SHARED_INSTANCE = createSharedInstance(context); } }
private Path pathToUserRatings() { return getOutputPath("userRatings"); } }
private Path pathToU(int iteration) { return iteration == numIterations - 1 ? getOutputPath("U") : getTempPath("U-" + iteration); }
@Override protected void map(IntWritable userOrItemID, VectorWritable ratingsWritable, Context ctx) throws IOException, InterruptedException { OpenIntObjectHashMap<Vector> uOrM = getSharedInstance(); uiOrmj.set(ALS.solveExplicit(ratingsWritable, uOrM, lambda, numFeatures)); ctx.write(userOrItemID, uiOrmj); }
private Path pathToItemRatings() { return getTempPath("itemRatings"); }
@Test public void completeJobImplicitToyExampleMultithreaded() throws Exception { implicitExample(2); }
@Test public void completeJobToyExampleMultithreaded() throws Exception { explicitExample(2); }
private Path pathToM(int iteration) { return iteration == numIterations - 1 ? getOutputPath("M") : getTempPath("M-" + iteration); }
@Override protected void map(IntWritable userOrItemID, VectorWritable ratingsWritable, Context ctx) throws IOException, InterruptedException { OpenIntObjectHashMap<Vector> uOrM = getSharedInstance(); uiOrmj.set(ALS.solveExplicit(ratingsWritable, uOrM, lambda, numFeatures)); ctx.write(userOrItemID, uiOrmj); }
final void setupSharedInstance(Context context) throws IOException { if (SHARED_INSTANCE == null) { SHARED_INSTANCE = createSharedInstance(context); } }
private Path pathToUserRatings() { return getOutputPath("userRatings"); } }
private Path pathToItemRatings() { return getTempPath("itemRatings"); }
private Path pathToU(int iteration) { return iteration == numIterations - 1 ? getOutputPath("U") : getTempPath("U-" + iteration); }
@Override protected void map(IntWritable userOrItemID, VectorWritable ratingsWritable, Context ctx) throws IOException, InterruptedException { OpenIntObjectHashMap<Vector> uOrM = getSharedInstance(); uiOrmj.set(ALS.solveExplicit(ratingsWritable, uOrM, lambda, numFeatures)); ctx.write(userOrItemID, uiOrmj); }
final void setupSharedInstance(Context context) throws IOException { if (SHARED_INSTANCE == null) { SHARED_INSTANCE = createSharedInstance(context); } }
private Path pathToUserRatings() { return getOutputPath("userRatings"); } }
private Path pathToItemRatings() { return getTempPath("itemRatings"); }
private Path pathToM(int iteration) { return iteration == numIterations - 1 ? getOutputPath("M") : getTempPath("M-" + iteration); }
private Path pathToM(int iteration) { return iteration == numIterations - 1 ? getOutputPath("M") : getTempPath("M-" + iteration); }
private Path pathToU(int iteration) { return iteration == numIterations - 1 ? getOutputPath("U") : getTempPath("U-" + iteration); }