使用Surprise构建推荐系统

时间:2020-03-20 00:27:59

标签: python recommender-systems

所以我正在使用这个名为Surprise的python库:https://surprise.readthedocs.io/en/stable/index.html

我要解决的问题是在遇到此错误时无法正确预测算法。 prints this saying the item doesnt exist.

但是,正如您在我的数据框中看到的那样,该项目确实存在: Dataframe

我按照以下说明正确使用了文档:

 # The columns must correspond to user id, item id and ratings (in that order). 
 train_data = Dataset.load_from_df(games_data[['userid', 'name', 'metascore']], reader) 

文档建议我看看这个https://surprise.readthedocs.io/en/stable/FAQ.html#raw-inner-note,但对此感到困惑。

我在做什么错?谢谢。

1 个答案:

答案 0 :(得分:0)

有运气吗?我也是这个软件包的新手,但我想知道是否可能由于数据类型问题而找不到用户。也许需要将用户或项目强制为字符串或数字以匹配。

您可以共享games_data.info()吗?

祝你好运!