本文整理匯總了Java中librec.intf.IterativeRecommender類的典型用法代碼示例。如果您正苦於以下問題:Java IterativeRecommender類的具體用法?Java IterativeRecommender怎麽用?Java IterativeRecommender使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
IterativeRecommender類屬於librec.intf包,在下文中一共展示了IterativeRecommender類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: preset
import librec.intf.IterativeRecommender; //導入依賴的package包/類
/**
* reset general (and static) settings
*/
protected void preset(String configFile) throws Exception {
// a new configer
cf = new FileConfiger(configFile);
// seeding the general recommender
Recommender.cf = cf;
// reset recommenders' static properties
Recommender.resetStatics = true;
IterativeRecommender.resetStatics = true;
GraphicRecommender.resetStatics = true;
// LibRec outputs
outputOptions = cf.getParamOptions("output.setup");
if (outputOptions != null) {
tempDirPath = outputOptions.getString("-dir", "./Results/");
}
// make output directory
Recommender.tempDirPath = FileIO.makeDirectory(tempDirPath);
// initialize random seed
LineConfiger evalOptions = cf.getParamOptions("evaluation.setup");
Randoms.seed(evalOptions.getLong("--rand-seed", System.currentTimeMillis())); // initial random seed
}