gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 19:23:30 28 4
gpt4 key购买 nike

我正在学习协作学习算法和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/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com