0

I read this website : http://lenskit.org/documentation/evaluator/quickstart/ I first tried to run it using the script " $ lenskit eval " and I just created a new groovy file in my hello-lenskit example and run it using the command line but nothing happened. Then I tried to use it in Java program(hello-lenskit.java). I run into some errors.

    File dataFile = new File("ml-100k/u.data");
    PreferenceDomain domain = new PreferenceDomain(1.0,5.0,1.0);
    DataSource data = new CSVDataSource("ml-100k",dataFile,"\t",domain);//give me an error CSVDataSource is not public and can not be accessed from the outside package.
    CrossfoldTask cross = new CrossfoldTask();

    LenskitConfiguration config1 = new LenskitConfiguration();
    config1.bind(ItemScorer.class)
            .to(UserMeanItemScorer.class);
    AlgorithmInstance alg1 = new AlgorithmInstance("PersMean",config1);
    evl.addAlgorithm(alg1);

    LenskitConfiguration config2 = new LenskitConfiguration();
    config2.bind(ItemScorer.class)
            .to(ItemItemScorer.class);
    config2.bind(UserVectorNormalizer.class)
            .to(BaselineSubtractingUserVectorNormalizer.class);
    config2.within(UserVectorNormalizer.class)
            .bind(BaselineScorer.class,ItemScorer.class)
            .to(ItemMeanRatingItemScorer.class);
    AlgorithmInstance alg2 = new AlgorithmInstance("ItemItem",config2);
    evl.addAlgorithm(alg2);

    evl.addMetric(RMSEPredictMetric.class);
    File file = new File("eval-results.csv");
    evl.setOutput(file);

What should I do next? How could I generate the overall rating error?

4

1 回答 1

1

手动使用 LensKit 评估命令很困难,没有记录,也不推荐。

SimpleEvaluator是从 Java 应用程序中的LensKit推荐器获得整体准确性的最佳方式。

为了进一步帮助调试 LensKit 运行,我建议通过电子邮件发送邮件列表,其中包含您正在运行的命令以及您得到的输出或错误。

于 2015-03-13T16:04:24.407 回答