Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Normalized DCG Evaluator is always 1.0 #269

Open
riccardomulas opened this issue Aug 22, 2018 · 1 comment
Open

Normalized DCG Evaluator is always 1.0 #269

riccardomulas opened this issue Aug 22, 2018 · 1 comment
Labels

Comments

@riccardomulas
Copy link

Hi.
I'm testing the library on different datasets and every time I execute a Recommender, the evaluation with normalized DCG returns 1.0. I tried with different datasets and recommenders, paying attention to the configuration, but I can't figure out where is the error. Is it possible that there is some bug in the class NormalizedDCGEvaluator? In the doc there are no examples about this evaluator and I don't know how to fix this.
The snippet of the code is the following:

conf.set("rec.recommender.similarities","item");
conf.set("rec.recommender.isranking", "true");
conf.set("rec.eval.enable", "true");
conf.set("rec.eval.class", "ndcg");
conf.set("rec.recommender.ranking.topn", "10");
conf.set("rec.recommender.class", "itemknn");
conf.set("rec.similarity,shrinkage", "10");
conf.set("rec.neighbors.knn.number", "50");

Recommender recommender = new ItemKNNRecommender();
recommender.recommend(context);

RecommenderEvaluator normDCGE = new NormalizedDCGEvaluator();
//normDCGE.setTopN(10);
double dcge = recommender.evaluate(normDCGE);
System.out.println("Normalized DCGE:" + dcge);
@allenjack allenjack added the bug label Aug 22, 2018
@SunYatong
Copy link
Collaborator

Does this happen with the built-in filmtrust and ml-100k datasets? I can't reproduce your problem with these two datasets.

BTW in your configuration:

conf.set("rec.similarity,shrinkage", "10");

the "," should be replaced with "." .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants