0
我正在嘗試一下mahout,並開始構建一切,並看看示例。我最感興趣的是協作過濾,所以我開始從BookCrossing數據集中找到推薦的例子。我設法讓所有的工作都能正常運行,樣本運行沒有錯誤。然而,outbput是這樣的:運行協作過濾的mahout示例:結果在哪裏?
INFO: Creating FileDataModel for file /tmp/taste.bookcrossing.
INFO: Reading file info...
INFO: Read lines: 433647
INFO: Processed 10000 users
INFO: Processed 20000 users
INFO: Processed 30000 users
INFO: Processed 40000 users
INFO: Processed 50000 users
INFO: Processed 60000 users
INFO: Processed 70000 users
INFO: Processed 77799 users
INFO: Beginning evaluation using 0.9 of BookCrossingDataModel
INFO: Processed 10000 users
INFO: Processed 20000 users
INFO: Processed 22090 users
INFO: Beginning evaluation of 4245 users
INFO: Starting timing of 4245 tasks in 2 threads
INFO: Average time per recommendation: 296ms
INFO: Approximate memory used: 115MB/167MB
INFO: Unable to recommend in 1 cases
INFO: Average time per recommendation: 67ms
INFO: Approximate memory used: 107MB/167MB
INFO: Unable to recommend in 2363 cases
INFO: Average time per recommendation: 72ms
INFO: Approximate memory used: 146MB/167MB
INFO: Unable to recommend in 5095 cases
INFO: Average time per recommendation: 71ms
INFO: Approximate memory used: 113MB/167MB
INFO: Unable to recommend in 7596 cases
INFO: Average time per recommendation: 71ms
INFO: Approximate memory used: 130MB/167MB
INFO: Unable to recommend in 10896 cases
INFO: Evaluation result: 1.0895580110095793
當我檢查的代碼,我可以看到,就是做這個的:
RecommenderIRStatsEvaluator evaluator = new GenericRecommenderIRStatsEvaluator();
File ratingsFile = TasteOptionParser.getRatings(args);
DataModel model =
ratingsFile == null ? new BookCrossingDataModel(true) : new BookCrossingDataModel(ratingsFile, true);
IRStatistics evaluation = evaluator.evaluate(
new BookCrossingBooleanRecommenderBuilder(),
new BookCrossingDataModelBuilder(),
model,
null,
3,
Double.NEGATIVE_INFINITY,
1.0);
log.info(String.valueOf(evaluation));
所以,這似乎是正確的,但我想看看來自生成的建議和/或相似性的更多細節。返回的對象是IRStatistics類型,只顯示結果統計信息中的一些數字。我應該看看其他地方嗎?這個推薦人不打算得到任何實際的建議嗎?
啊,很酷。那麼我很明顯對這個例子期望過高。 –
是的,這是看錯的地方。在第17頁的示例中,建議最簡單。 –