HGN
HGN copied to clipboard
A mistake on negative sampling
https://github.com/allenjack/HGN/blob/8bf6008e106fc3b1bc882bab6e65698e62c54ac6/run.py#L91
I think you may change it to this one. Otherwise, positive items can be sampled.
ret = np.asarray(neg_samples).reshape(train_matrix.shape[0], num_sets, num_neg) # [n_user, ]
return np.transpose(ret, axes=[1, 0, 2])```
Hi, that is a good suggestion. I will rewrite the negative sampling part into a multi-process manner later.