Hi,
Would it be possible to provide an example of how to use lenskit.batch.predict?
I'm using it like this, following the example you have for lenskit.batch.recommend:
def eval_prediction(aname, algo, train, test):
model = algo.fit(train)
pred = batch.predict(model, test)
# add the algorithm
pred['Algorithm'] = aname
return pred
This is returning a pandas dataframe with user item rating prediction Algorithm, and then I use the prediction and the rating columns to calculate measures such as RMSE and MAE.
I also use this results to get the topk for each user and to calculate the Precision and Recall.
However, the results for different algorithms are returning almost the same.
Example:
itemitem algorithm
precision: 0.6782234173273409
recall: 0.7296116298361521
f-measure: 0.632498476558497
nDCG: 0.7585345378190396
RMSE 0.9011650664582945
MAE 0.7024033793043883
useruser algorithm
precision: 0.6731332794694407
recall: 0.726284079214471
f-measure: 0.6283638681052782
nDCG: 0.7548728363422198
RMSE 0.9279957720764701
MAE 0.723097540584582
Maybe I'm not using the batch predict correctly.
Best Regards,
Márcia Barros