Skip to content

Wrong sampling procedure in BPR? #255

@artli

Description

@artli

It seems to me that the (u, i, j) triplets are not being sampled uniformly. This line selects a disliked item j by uniformly drawing a non-zero entry of the user-item matrix and getting its column. This should lead to popular items being oversampled as negative examples. It may actually turn out to be beneficial empirically but is not in accordance with the paper.

(u, i) are being drawn uniformly though, so I guess the issue can be fixed by selecting j uniformly from the range (0, items - 1). With verify_neg enabled, this should result in true uniform sampling, as far as I understand.

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