Open nabilariefm-hi opened 2 years ago
You can output them in order with the following code:
the topic list: print llda_model.topics
the term(word) list: print llda_model.terms
aaa i see2 thankyouu again!!
Nabila Arief Muharomah Undergraduate Student of Engineering Management Bandung Institute of Technology Indonesia
On Sun, Aug 14, 2022 at 6:27 PM Jiahong @.***> wrote:
You can output them in order with the following code: the topic list: print llda_model.topics the term(word) list: print llda_model.terms
— Reply to this email directly, view it on GitHub https://github.com/JoeZJH/Labeled-LDA-Python/issues/9#issuecomment-1214345592, or unsubscribe https://github.com/notifications/unsubscribe-auth/A2JQHIMLSWU6DBUSJUP634DVZDJZTANCNFSM56PU7YEA . You are receiving this because you authored the thread.Message ID: @.***>
Halo Joe, I really confused with the result, why the beta (topic-word) result same number (probability) for every label (my label is rating 1,2,3,4,5). Do you know why? Should I increase the iteration number? Really appreciate your answer because this is for my undergraduate thesis. Thankyouu fyi : differensial is (5+4) - (1+2)
How many iterations did you use? may be you can try more iterations.
I use 1000 iteration
Probably because you have too little data.
aaah i see2 maybe thats the reason. Also I want to ask which one better I use to train a model? the (1) or (2)?
(1) --> #llda_model.training(iteration=100, log=True) (2) --> #while True: print("iteration %s sampling..." % (llda_model.iteration + 1)) llda_model.training(1) print("after iteration: %s, perplexity: %s" % (llda_model.iteration, llda_model.perplexity())) print("delta beta: %s" % llda_model.delta_beta) if llda_model.is_convergent(method="beta", delta=0.01): break
Both of them will be ok. If you do not know how many iterations it takes for the model to converge, you can use (2) to get a convergent model.
Aaaah I see2 , okee Joe thankyouu so much for all the answer😊
Happy to help!
Also I want to ask how did you know the order of the topic and term from this topic term matrix? (which one is the label 1,2,3 and words order) Thankyouuu