I think that means you are using the wrong input to #4. It looks like you are 
trying to evaluate the ALS recs then create a recommender? To use ALS for recs 
try the CLI first see “mahout recommendfactorized” with input = (userid, 
itemid, rating). If #4 is to create all recs for all known users then it is 
independent of all other jobs since it takes interactions or ratings as input. 
not the output f a previous job.


On Mar 19, 2015, at 7:11 AM, James Parker <[email protected]> wrote:

Hi,
I try ALS recommender using Java code.  This is the steps i follow:
1.  I create DatasetSplitter Job

2.  I create ParallelALSFactorizationJob  Job

3. I create FactorizationEvaluator   Job

4.  I create RecommenderJob Job

Everything  is ok for 1 to 3. But when i run the RecommenderJob , i have
the following error
-------------------------------------------------------------------------------------------------------------------------------
java.lang.Exception: java.lang.RuntimeException:
java.lang.ClassCastException:
org.apache.mahout.math.map.OpenIntObjectHashMap cannot be cast to
org.apache.mahout.common.Pair
   at
org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:403)
.
.
----------------------------------------------------------------------------------------------------------------------------


I'm suprised to see that if i run steps 1 to 3 using my java code, and the
last step using the command line "mahout recommendfactorized ........"
with  the files generates with my java code steps 1 to 3), recommendations
are correctly generated.

Thanks you very much

Evans

Reply via email to