pietrobarbiero / entropy-lens

Apache License 2.0
13 stars 3 forks source link

Inconsistent binary prediction: comparing logits instead of softmax results with threshold 0.5 #2

Closed Yanci87 closed 1 year ago

Yanci87 commented 1 year ago

Hi, I've been working with entropy-lens and I really appreacite your work. However, I noticed that the binary predictions made by the model seem inconsistent. Upon inspecting the code, I found that in file "./logic/nn.entropy.py" the function (_get_correct_data) compares the logits "preds" returned by the forward function in EntropyLinear with a threshold of 0.5 to make binary predictions, rather than using the softmax results. Since the logits are not constrained to the range of (0, 1), this approach can lead to incorrect predictions.

pietrobarbiero commented 1 year ago

Hi @Yanci87! Thank you for bringing up this issue. However, we moved the development of this project to https://github.com/pietrobarbiero/pytorch_explain. This problem should be fixed there. Please let me know if you find other issues! :)