Hanjun-Dai / pytorch_structure2vec

pytorch implementation of structure2vec (https://arxiv.org/abs/1603.05629)
MIT License
305 stars 76 forks source link

Resampling indices #12

Closed hgascon closed 5 years ago

hgascon commented 6 years ago

Hi @Hanjun-Dai, could you briefly explain the role of the function at https://github.com/Hanjun-Dai/pytorch_structure2vec/blob/master/harvard_cep/util.py#L27 ? Thanks.

Hanjun-Dai commented 5 years ago

Hello, sorry for my late reply -- this is used for handling the imbalanced data. I'm trying to give samples with different labels equal chance of being sampled. You can also try the weighted loss to help resolve this problem.