-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RuntimeWarning: invalid value encountered in double_scalars #22
Comments
Can you provide more information so I can try to reproduce your problem? |
@svpino |
Feel free to send a Pull request. I'll review and merge it.
Thanks!
svpino.
…On Tue, Feb 18, 2020 at 4:43 PM MuhammadAliShahzad ***@***.***> wrote:
@svpino <https://github.com/svpino>
This is a division by Zero error. on line 121
precision = float(confusion_matrix[id, id] / total_predicted)
If you fix the division by zero, this should solve the problem
if total_predicted == 0: precision = 0.0 else: precision =
float(confusion_matrix[id, id] / total_predicted)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#22?email_source=notifications&email_token=AAITCSSBGT2XXXH5ESO7C3LRDRI6PA5CNFSM4KIUMPCKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMFKS2A#issuecomment-587901288>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAITCST7AMMK2VGGRH5WWWDRDRI6PANCNFSM4KIUMPCA>
.
|
Hi @svpino if i have ground truth and prediction value both in txt file then how can i used your repo? can you please explained me. Help is deep appreciate |
Confusion Matrix:
[[0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0.]
[0. 0. 0. 0. 0.]]
confusion_matrix.py:115: RuntimeWarning: invalid value encountered in double_scalars
precision = (confusion_matrix[id, id] / total_predicted)
confusion_matrix.py:116: RuntimeWarning: invalid value encountered in double_scalars
recall = (confusion_matrix[id, id] / total_target)
category precision_@0.5IOU recall_@0.5IOU
0 Her2 NaN NaN
1 LuminalA NaN NaN
2 LuminalB NaN NaN
3 Triple NaN NaN
The text was updated successfully, but these errors were encountered: