Providing weights to NegativeSampling in LinkNeighborLoader #9229
-
Hi! I'm doing a link prediction task, but my graph is pretty highly unbalanced on node degree (some nodes have far more links than others). I'm passing the It seems to need to be provided to the Can I provide this Wondering if @rusty1s or someone else has a minute to help out. Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Do you mind to share a small code snippet to reproduce your error? Given that you have a node-level weight vector, you should be able to do loader = LinkNeighborLoader(
data,
neg_sampling=dict(mode='binary', amount=1, weight=weight_vector),
) |
Beta Was this translation helpful? Give feedback.
Sorry for late reply. I fixed this in #9316. From PyG master, you should be able to now pass
src_weight
anddst_weight
toNegativeSampling