mp2893 / med2vec

Repository for Med2Vec project
BSD 3-Clause "New" or "Revised" License
220 stars 74 forks source link

Negative Code Embeddings #17

Closed Ankit267 closed 5 years ago

Ankit267 commented 5 years ago

Hello Ed,

In the Med2Vec code , you have mentioned the weights as (-0.01,0.01) ,which is generating negative code embeddings. _params['Wemb'] = np.random.uniform(-0.01, 0.01,

however in the paper you have mentioned that "all medical codes C to non-negative real-valued vectors of dimension m"

Can you please help me in understanding that?

Thanks, Ankit

mp2893 commented 5 years ago

Hi Ankit,

Medical codes are derived by ReLU(W_emb x_t + b_emb), which makes the codes non-negative. (That is the equation (1) in the paper).

Best, Ed

Ankit267 commented 5 years ago

Thanks Ed!!