python - sklearn Surprise .predict 方法中 r_ui (真实评分)参数的用途是什么?

标签 python scikit-learn data-science

我正在学习协作学习算法和sklearnsurprise库,但我很好奇.predict函数中这个参数有什么用。

文档指出:

We can now predict ratings by directly calling the predict() method. Let’s say you’re interested in user 196 and item 302 (make sure they’re in the trainset!), and you know that the true rating rui=4:

但是,评级是我试图预测的。如果我已经有了它,将它传递给这个函数有什么用?

最佳答案

它不用于进行预测。它就在那里,因此您可以轻松地将预测值与实际值进行比较。

如果你查看来源code r_ui 从未用于任何计算,而是传递给 Prediction类,仅存储结果并格式化字符串以进行打印。

关于python - sklearn Surprise .predict 方法中 r_ui (真实评分)参数的用途是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62723847/

相关文章:

python - 多变量高斯过程回归: adaptation of kernels

python - 使用另一个分类变量 'share' 绘制 'Day' 列的箱线图

python - Numpy神经网络成本计算: result changes after first run

performance - 预测速度慢: Scikit Gaussian Process classification

python - 在 pandas 中将一列连接到另一列的末尾后获取列的平均值

python - 如何提取标签之间的所有文本?

python - 带有键盘快捷键的 Tkinter 下拉菜单?

jquery - 从包含多个文本的表格单元格中提取单个文本 Robot Framework

python - cx_Oracle查询结果到嵌套字典

numpy - 创建预测产品价格的回归模型