mahout-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saurav Sarkar <saurav.sark...@gmail.com>
Subject SVD Recommender using Mahout
Date Mon, 03 Oct 2016 07:45:31 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message