Open clark021125 opened 5 years ago
Hi, thanks for your feedback. You are right, the previous code got the index of the iterator. It should be getKey()
rather than getKeyIdx()
.
I just fixed the bug, please update your code and check my modification.
Good job!
Hi,
I am new to LibRec. When playing around with the system I noticed that the recommend items it gives in output files are always identical regardless which ranking algorithm I used. So, I read through the source code and spotted these codes below which may not make sense.
https://github.com/guoguibing/librec/blob/63f8a733cc10127abcfd35dc91e16daf7970302a/core/src/main/java/net/librec/recommender/AbstractRecommender.java#L225
The method being called within parenthesis seems to be
getKey()
rather thangetKeyIdx()
, sincekeyIdx
only depicts the index ofkey
in the subclass below.https://github.com/guoguibing/librec/blob/63f8a733cc10127abcfd35dc91e16daf7970302a/core/src/main/java/net/librec/recommender/item/RecommendedList.java#L285-L334
This would cause mismatch when interpreting a
key
to a realitemId
and finally theitemId
s in results files are always the same. However, LibRec is a complex system and I am still not sure if I am lending a hand.