// ------------------------------------------------------
//    Recommendations with Digg API
// ------------------------------------------------------
import *;

String yHome = YooreekaConfigurator.getHome();

// Load data from Digg and save them in a file
// BaseDataset ds = DiggData.loadDataFromDigg(yHome+"/data/ch03/digg_stories.csv");

// Load previously saved data
BaseDataset ds = DiggData.loadData(yHome+"/data/ch03/digg_stories.csv");


// 2. Pick a user randomly or by username
org.yooreeka.algos.reco.collab.model.User user = ds.getUser(1);

// Or pick some specific user by username
//DiggData.showUsers();
//User user = ds.findUserByName("<some name>");


// 3. Show similar users
DiggDelphi delphi = new DiggDelphi(ds);

delphi.findSimilarUsers(user);
delphi.recommend(user);

// org.yooreeka.algos.reco.collab.model.User u2 = ds.findUserByName("adrian67");
// delphi.findSimilarUsers(u2);
// delphi.recommend(u2);

// org.yooreeka.algos.reco.collab.model.User u3 = ds.findUserByName("amipress");
// delphi.findSimilarUsers(u3);
// delphi.recommend(u3);


