Automated Topic Analysis of the Voynich Manuscript
#7
(31-07-2025, 03:35 PM)nablator wrote: You are not allowed to view links. Register or Login to view.Isn't the number of topics a parameter of LDA? Which approach/algorithm/implementation do you use for deciding how many topics there are?

I iterate through different topic numbers and calculate the Coherence Score, then I take the maximum. In the last case (without repetitive words) I got this scores:

[Image: sv0H42X.png]

I use this function that uses gensim LdaModel and CoherenceModel

Code:
# 4. Coherence computation function def compute_coherence(dictionary, corpus, texts, start=2, limit=15, step=1):     coherence_values = []     model_list = []         for num_topics in range(start, limit + 1, step):         model = LdaModel(             corpus=corpus,             id2word=dictionary,             num_topics=num_topics,             random_state=42,             passes=20,             alpha='auto'         )         model_list.append(model)                 coherencemodel = CoherenceModel(             model=model,             texts=texts,             dictionary=dictionary,             coherence='c_v'         )         coherence_values.append(coherencemodel.get_coherence())         return model_list, coherence_values
[+] 1 user says Thank You to quimqu for this post
Reply


Messages In This Thread
RE: Automated Topic Analysis of the Voynich Manuscript - by quimqu - 31-07-2025, 03:44 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How Different is Each Topic Each Other - Term Frequency Across Topic A.Wilmarth 6 7,137 31-07-2024, 04:28 PM
Last Post: RobGea
  Hypervector Analysis of the Voynich Manuscript dvallis 126 111,352 15-09-2020, 08:53 AM
Last Post: -JKP-

Forum Jump:


Users browsing this thread: 3 Guest(s)