Skip to content
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

output file #7

Closed
TheodoreZhao opened this issue Aug 23, 2017 · 2 comments
Closed

output file #7

TheodoreZhao opened this issue Aug 23, 2017 · 2 comments

Comments

@TheodoreZhao
Copy link

TheodoreZhao commented Aug 23, 2017

Hi Edward,
I have run your code on my dataset and got the .npz files. I find it contains 6 numpy.array variables W_emb b_output b_hidden b_emb W_output W_hidden. But on the GitHub Repo I can’t find further description about these output variables. Can you give some detailed instruction about the output? How can I get the code and visit representation?

@mp2893
Copy link
Owner

mp2893 commented Aug 23, 2017

Hi Theodore,

First of all, let me explain how to obtain vector representations for each code.
If you look at Fig.2 of the paper, ReLU(W_emb x_t + b_emb) is the representation of multiple codes (since x_t will have multiple 1s). If you make x_t such that it has only a single 1, then ReLU(W_emb x_t + b_emb) will be a representation of a single code. For example, if the coordinate 0 represents "Lung cancer" and you make x_t such that <1,0,0,0,0,....,0,0>, then ReLU(W_emb x_t + b_emb) will be the vector representation of "Lung cancer"

For visit representation, you can derive the code-level representation using u_t = ReLU(W_emb x_t + b_emb), possibly with a multi-hot vector, then use v_t = ReLU(W_hidden u_t + b_hidden) to derive the visit representation.

You can also read section 3.1 of my paper. Figure 2 will also help you.

Thanks,
Ed

@mp2893 mp2893 closed this as completed Aug 23, 2017
@mp2893
Copy link
Owner

mp2893 commented Aug 24, 2017

Yeah that's correct. My mistake.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants