Hi All,

I am new to Mahout and I am trying to  run SVDRecommender on movie lens
dataset.

The program is getting stuck when i am initializing the
SVDPlusPlusFactorizer.
Ratings.csv contains data in the form of userid,itemid,ratings.
Is it the right way to do ?

Below is my code.

    public void recommendSVDRecommender(){
try{
FileDataModel model = new FileDataModel(new
File("\\data\\movielens\\ratings.csv"));
SVDPlusPlusFactorizer factorizer = new SVDPlusPlusFactorizer(model,4,20);
SVDRecommender recommender = new SVDRecommender(model, factorizer);
List<RecommendedItem> recommendations = recommender.recommend(2, 5);
for (RecommendedItem recommendation : recommendations) {
 System.out.println(recommendation);
}
}
catch(Exception e){
e.printStackTrace();
}
}

cheers,

Saurav

Reply via email to