sunlabuiuc / PyHealth

A Deep Learning Python Toolkit for Healthcare Applications.
https://pyhealth.readthedocs.io
MIT License
994 stars 212 forks source link

wrong code in pyhealth\metrics\drug_recommendation.py #249

Closed Tyunsen closed 1 year ago

Tyunsen commented 1 year ago

Hello, when you update the code, you wrote the wrong code to calculate ddi, the original code is correct. It bothered me all morning. ^ ^

if ddi_matrix[i, j] == 1 or ddi_matrix[j, i] == 1: # wrong code if ddi_matrix[med_i, med_j] == 1 or ddi_matrix[med_j, med_i] == 1: # Old and correct code

ycq091044 commented 1 year ago

Thanks very much @Tyunsen ! Sorry for the error.

We made a mistake when integrating the ddi metric into multilabel metric func. Right now, the problem is fixed. Sorry to cause trouble for your code!