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