Comments (6)
Hi Shashwat,
W_output and b_output are used in Med2Vec training phase only.
They are used to predict the neighboring visits.
The weights (embeddings) you might be interested are W_emb since they are used to encode medical codes such as diagnosis codes or medication codes.
Best,
Ed
from med2vec.
Thanks, Ed!
But Just to get a more clear picture-
W_emb - These are embedding used for encoding medical codes,So these encoding is based on Med2Vec Architecture.
W_outputs - These are predicted neighbouring visits
Please Correct me if I am getting it wrong
What about W_hidden and b_hidden?
Best ,
Shashwat
from med2vec.
W_output is not the predicted neighboring visits.
It is "used" to predict neighboring visits. It is W_s of Eq.2 in the paper, which is used right before the softmax layer.
W_hidden is used to derive the visit embeddings. It is W_v in Fig.2 of the paper.
(A visit is a set of medical codes)
And, of course, W_emb is W_c in Fig.2 of the paper.
Hope this clarifies.
Best,
Ed
from med2vec.
Ok Ed! I got the point
Sorry for raising so many issues
So how can I get the final output of Med2Vec.
Actually I want to use the learned visit level and code level representation from Med2Vec.
My problem statement is to use these learned visit as well as code representation in RNN for predicting Type II diabetes
Here are some questions-
1.So Is there any way to use these learned visit level and code level representations and how can I derive it without using any mathematical formula?
2. Is there any way to use these learned visit level and code level representations to build the model?
Thank You!
from med2vec.
-
The current implementation does not let you generate visit embeddings and code embeddings after you've trained the parameters (and I don't plan to update the code, since Theano is no longer maintained) So you will need to follow the equations in the paper to generate the embeddings yourself.
They are pretty straightforward actually. For visit embedding, all you need to do is format your data as described in README, then just follow lines 65, 66, 67. For code embedding, the i-th row of W_emb is the code embedding for the i-th code. -
That's up to you. Whether you want to use the visit embeddings as input to the RNN, or you want to sum the code embeddings yourself and feed it to the RNN, you can try many different approaches.
from med2vec.
Thanks Ed!
from med2vec.
Related Issues (20)
- TyperError: Expected Variable, got odict values HOT 4
- Negative Visit Forward Cross-Entropy on MIMIC-III HOT 1
- Questions about experiments HOT 1
- questions about the training data format HOT 3
- How to tune parameters to avoid cost:nan? HOT 1
- Where I can find the AHFS classification table? HOT 1
- Negative Code Embeddings HOT 2
- high training cost HOT 2
- Scatter plot from learned code representations HOT 16
- Epochs and loss during training HOT 3
- Mapping embeddings to ICD codes HOT 2
- NaN gradient may be due to weight initialization HOT 4
- Interpretation of learned representations
- How to make demo.txt
- GPU training fails HOT 5
- Cost and Weights are NAN HOT 2
- output file HOT 2
- Output model/weights? HOT 3
- Questions about complexity analysis HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from med2vec.