lda2vec icon indicating copy to clipboard operation
lda2vec copied to clipboard

How to predict with a lda2vec model

Open alexwongdl opened this issue 7 years ago • 14 comments

When I have a lda2vec model, how can I predit the vector of a document with this model. I couldn't find the prediction method in any of following files : corpus.py dirichlet_likelihood.py embed_mixture.py fake_data.py init.py negative_sampling.py preprocess.py topics.py tracking.py utils.py.

alexwongdl avatar Mar 20 '17 03:03 alexwongdl

It doesn't have a prediction function yet

yg37 avatar Oct 26 '17 22:10 yg37

@AlexWang90 @yg37 did you have a solution for predicting the embedding for a new document? can you please share your slolution

ali3assi avatar May 03 '18 20:05 ali3assi

@TamouzeAssi I wrote a prediction function and tested it on some new documents. The results are not very good (I think it's because I did not run enough epochs). I can send you the function if you want to experiment with it more.

yg37 avatar May 03 '18 21:05 yg37

@yg37 yes please send it, i wanna try it and check what can i do and improve it. thank you

ali3assi avatar May 03 '18 21:05 ali3assi

@TamouzeAssi What's your email address?

yg37 avatar May 04 '18 18:05 yg37

@yg37 can you email me? I tried to reach out via the email on your bio, but it seems it may be dead! My email is [email protected] . Thank you!

nateraw avatar May 15 '18 23:05 nateraw

@yg37 Thank you for your quick reply!! I am using Tensorflow, as I don't know Chainer. Can you give me a theoretical understanding of what you are doing, please?

This is my current thought process:

  1. Append a new random document weight to document matrix (Within the range of current weights)
  2. Collect skipgram pairs for this document (~30-100 pairs)
  3. Collect random sampling of previously trained skipgram pairs (~10000 pairs)
  4. Shuffle the two lists of pairs together
  5. Train using the combined list of skipgram pairs, locking word vectors
  6. Evaluate the new document/topic embeddings

Am I close to what you are doing? Again, thank you!!

nateraw avatar May 15 '18 23:05 nateraw

@yg37 I am I would also be interested in seeing what you have implemented for a prediction function.

Any way that you could either publish your code, or send me what you have.

Thanks

arhelgens avatar Aug 28 '18 21:08 arhelgens

Hi @yg37 just wondering if I could have the implementation of your prediction function? My email is [email protected]. Much appreaciated :).

simon19891101 avatar Oct 17 '18 20:10 simon19891101

Hi @yg37 I would like to use your function to predict, please could you send it to me, this is my email [email protected], in advance thank you

raziel130889 avatar Apr 27 '19 01:04 raziel130889

hi, @yg37 ,I am working with lda2vec as well, I will be thankful if you can send the predict function across to me.

sudheernaidu53 avatar Jul 02 '19 11:07 sudheernaidu53

Please send the predict function here as well [email protected]

Shivanshu156 avatar Jul 11 '19 07:07 Shivanshu156

Hi @yg37 I would much appreciate it if you would send me your predict function implementation :) [email protected] Thank you in advance. :)

kandakji avatar Nov 02 '19 17:11 kandakji

Hi @yg37 I would much appreciate it if you would send me your predict function implementation, this is my email [email protected], in advance thank you

leewide avatar May 14 '20 01:05 leewide