Giter VIP home page Giter VIP logo

Comments (8)

jiangshu-cn avatar jiangshu-cn commented on June 3, 2024

大佬,有没有看特征工程那部分代码,怎么只有对召回的数据构建标签了,那label不是都为0了吗,后面怎么训练呢,这块代码我看了几遍了

from fun-rec.

ruyiluo avatar ruyiluo commented on June 3, 2024

我有空在看一下哈,因为那边过去好久了,得重新看得花点时间,其实我都忘记了你现在说的这些东西了,晚一点给你答复

from fun-rec.

ruyiluo avatar ruyiluo commented on June 3, 2024

@jiangshu-cn 在给数据打标签的那一部分就是包括了label为0和为1的情况呀,为什么是只有label为0的呢?你那边的结果是发现label都是0么?那可能是召回部分效果不好导致的,所以打标签的时候没有1. 不知道我又没有理解到你的意思。

from fun-rec.

aloneCR avatar aloneCR commented on June 3, 2024

大佬,有没有看特征工程那部分代码,怎么只有对召回的数据构建标签了,那label不是都为0了吗,后面怎么训练呢,这块代码我看了几遍了

我还没看到那里去,我也是刚学这个。你有推荐系统学习交流的群吗?

from fun-rec.

aloneCR avatar aloneCR commented on June 3, 2024

我有空在看一下哈,因为那边过去好久了,得重新看得花点时间,其实我都忘记了你现在说的这些东西了,晚一点给你答复

好的,大佬辛苦了。

from fun-rec.

jiangshu-cn avatar jiangshu-cn commented on June 3, 2024

@aloneCR 哦哦,没有交流群哦

from fun-rec.

ruyiluo avatar ruyiluo commented on June 3, 2024

刚才新建了一个交流群,一会我放到readme里面,欢迎大家来讨论呀

from fun-rec.

ruyiluo avatar ruyiluo commented on June 3, 2024

以下代码完成了对self.mu的初始化

cnt = 0  # 统计总的打分数,初始化mu用
for user, items in self.rating_data.items():
    self.P[user] = [random.random() / math.sqrt(self.F)
                    for x in range(0, self.F)]
    self.bu[user] = 0
    cnt += len(items)
    for item, rating in items.items():
        # insert self.mu += rating
        if item not in self.Q:
            self.Q[item] = [random.random() / math.sqrt(self.F)
                            for x in range(0, self.F)]
            self.bi[item] = 0
self.mu /= cnt

此时的self.mu为0,那么执行self.mu /= cnt后的结果仍然是0,所以应该在第8行加入self.mu += rating,把self.mu变成分数之和。

代码已经修改啦!

from fun-rec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.