Code Monkey home page Code Monkey logo

safedrug's Introduction

Hi there 👋, this is Chaoqi YANG (杨超琪 in Chinese).

A final-year PhD student of computer science at UIUC. Here is my homepage.

safedrug's People

Contributors

ycq091044 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

safedrug's Issues

issue for DMNC

Dear author, the DMNC source code has reported the following error, do you have any solutions?

Traceback (most recent call last):
File "SafeDrug/src/DMNC.py", line 187, in
main()
File "SafeDrug/src/DMNC.py", line 154, in main
loss.backward(retain_graph=True)
File "D:\liuhaifeng\anaconda\envs\bibi\lib\site-packages\torch\tensor.py", line 185, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "D:\liuhaifeng\anaconda\envs\bibi\lib\site-packages\torch\autograd_init_.py", line 127, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.cuda.FloatTensor [128, 136]], which is output 0 of TBackward, is at version 2; expected version 1 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

Cannot run ddi_mask_H.py in data prepocessing

@ycq091044
Hi Yang:
When I try to preprocess the MIMIC-III data with your preprocessing codes, I found that there is an error in line 8 of ddi_mask_H.py, showing idx2drug.pkl not found. Is idx2drug.pkl generated by get_SMILES.py? But when I try to run
get_SMILES.py, an error in line 10 occurred with hint "DataFrame" object has no attribute 'ATC4'. It seems that 'ndc2atc' has attribute 'ATC5' instead of 'ATC4'. Also in line 14 of "get_SMILES.py", it seems that atc2ndc doesn't have atttibute 'NDC'.
Is there anything wrong about the data processing files, or am I getting wrong at the data processing procedures. Thanks in advance!

Target for trainning and testing

Hi,我想知道模型的训练和测试是使用患者的最后一次药物还是使用该用户所有用过的药物作为ground truth?
预处理里面似乎使用患者所有用过的药物作为label。

Some problems encountered during reproduction

This is excellent work, and thanks a lot for your open-source code. However, when I reproduced your work, I found that I could not achieve the results reported in the article.
In reproducing, I followed exactly the steps in the readme.md and used the same hardware. Besides, in the article, you report a learning rate of 2e-4, whereas the default learning rate in the code is 5e-4. In reproducing, I found that the result was better when the learning rate was set to 5e-4.
I don't know what's wrong, and I hope I can get your help. Thank you very much.

The following results are reproduced.

When the learning rate is set to 5e-4:

DDI: 0.0632 (0.0003) Ja: 0.5114 (0.0026) F1: 0.6676 (0.0023) PRAUC: 0.7649 (0.0028)

When the learning rate is set to 2e-4:

DDI: 0.0607 (0.0005) Ja: 0.5089 (0.0022) F1: 0.6659 (0.0019) PRAUC: 0.7632 (0.0022)

The results reported in the article:

DDI: 0.0589 (0.0005) Ja: 0.5213 (0.0030) F1: 0.6768 (0.0027) PRAUC: 0.7647 (0.0025)

Question-1

image

Hi @ycq091044, well-done!
I am try to do data processing but different result with that you showed.
Can you tell me what i did wrong?

Question about data processing

Hi, The paper claims that you filter out the patients with only one visit. But I found that there are still 908 records in the data that contain one visit. Could you help look into the problem?
image

About

Hello, Thanks for your code! I want to know how to generate the file records_final.pkl with 6350 items in the GitHub repository.
Wait for your responses, Thank you again !

Question about the visit order for a single patient

Hello,
I have a question about the data processing procedure written in 'data/processing.py' : for a single patient, how to keep the visit sequence is ordered by the visit time? Because downstream task(medication prediction for the patient's t-th visit) and the longitudinal patient representation module, I think time-ordered visit sequence is necessary. And it should be ordered by the 'ADMITTIME' in admissions table of the mimic-iii dataset. Maybe I don't understand the code and the mimic-iii dataset enough. Thanks in advance.

About drug-DDI.csv file

Hi there, I ran into a problem regarding the drug-drug adverse side effects, and I need to figure out how this data is generated and some illustrations about the schema of this file. Could you please give me some hints about the source of the data?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.