【发布时间】:2020-03-20 00:27:59
【问题描述】:
所以我正在使用这个名为 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,但我被它弄糊涂了。
我做错了什么?谢谢。
【问题讨论】:
-
您的 raw_id 数字是包含在字符串中还是字母数字中?
-
我的 raw_id 是一个字符串。
标签: python recommender-systems