Skip to content

关于负采样的建议 #2

Description

@cowry5

items_pool = set()

书中的负采样描述的是 对每个用户采样负样本时,要选取那些很热门,而用户却没有行为的物品。且书中的item_pool是一个列表,我的理解是不用去重,列表中重复的次数代表着物品的流行度,流行度大的更容易被采样到。但这样可能存在items列表过大...

所以可以考虑得到去重之后的物品列表后,记录每个物品的出现次数,与总个数相处得到频率,以此作为np.choice抽样的概率。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions