-
Notifications
You must be signed in to change notification settings - Fork 71
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
Dimensions not matching? #12
Comments
Hi nair-p, After you train the model, you should be able to see W_emb, of which the dimension size is some thousand dimensions by the embedding dimension. That is the embeddings of all medical codes plus the ancestor codes. You use attention on W_emb to derive the G matrix, which happens between line 126 and line 132 of gram.py. Best, |
Hi Edward, Thank you for getting back. I actually did try doing what you suggested. However, I seem to be getting the following error when I try to generate I tried modifying your code a little bit to save the predicted values of the test set at each epoch (saving the I used the label file frequency of medical codes to divide them into bins of percentiles as mentioned in the paper. Then for each bin, I obtain the patients whose true label lies in that bin and check the accuracy@20 for the predicted labels for these patients. Is this how you calculate the accuracy@20 for each bin? Thanks, |
Hi Edward,
I'm trying to reproduce GRAM results using MIMIC-III data.
If I understand correctly, there are 4894 medical codes used to represent patient visits. So the G matrix (from the paper) has to be of size 4894 x 128 (embedding dimension). However, there are no matrices of that size stored as a result of running gram.py.
Am I missing something or am I supposed to be deriving the G matrix with the help of other stored files? I tried to do this too but the dimensions just don't seem to be matching. Any help will be highly appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: