VITA-Group / Self-PU

[ICML2020] "Self-PU: Self Boosted and Calibrated Positive-Unlabeled Training" by Xuxi Chen, Wuyang Chen, Tianlong Chen, Ye Yuan, Chen Gong, Kewei Chen, Zhangyang Wang
MIT License
66 stars 11 forks source link

关于代码中nnPU的一些疑问 #3

Closed Wongcheukwai closed 3 years ago

Wongcheukwai commented 3 years ago

在Self-PU/utils/util.py的第238行, return R_p - BETA, -gamma*Rn 这里是不是有错鸭,因为这个意思是,如果Rn>0的话,应该return Rp+0吧?因为在主程序里你返回的参数是, , loss = criterion(output1, Y),按照这样的话,你返回的loss是Rn

xxchenxx commented 3 years ago

We do need to return \gamma * Rn here. Please see Algorithm 1 in https://arxiv.org/pdf/1703.00593.pdf. Also, you can refer to https://github.com/kiryor/nnPUlearning/blob/a522c0edd22c54b627eb131e960584950eae5330/pu_loss.py#L51 for help. We adapted their code.