Giter VIP home page Giter VIP logo

Comments (6)

mp2893 avatar mp2893 commented on September 26, 2024

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.

shashwatwork avatar shashwatwork commented on September 26, 2024

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.

mp2893 avatar mp2893 commented on September 26, 2024

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.

shashwatwork avatar shashwatwork commented on September 26, 2024

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.

mp2893 avatar mp2893 commented on September 26, 2024
  1. 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.

  2. 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.

shashwatwork avatar shashwatwork commented on September 26, 2024

Thanks Ed!

from med2vec.

Related Issues (20)

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.