You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#데이터 준비, vocab 준비 및 전처리df=list()
withopen("result/mecab_lda_corpus.csv", mode="r", encoding="UTF-8") asf:
df=f.readlines()
df= [i.rstrip() foriindf]
df=list(reversed(df))
time_point_list= [387,693,991]
#DTM 모델model=tp.DTModel(k=1, t=3, alpha_var=5.56, eta_var=0.1)
forcnt, lineinenumerate(df):
fortime_point, accumulate_valueinenumerate(time_point_list):
ifcnt<accumulate_value:
model.add_doc(line.split(), timepoint=time_point)
break#model training 및 로그우도 그래프와 summaryloglikelihood_list=list()
for_inrange(10000):
model.train(1, workers=4)
loglikelihood_list.append(model.ll_per_word)
sns.lineplot(loglikelihood_list)
plt.title("Convergence Graph of Log-Likelihood per Word by Iterating DTM Model")
plt.show()
print(model.summary())
I tested above code but it was breaked. The initial value of K is 1 and it's also possible in official documentation. But at model.train(), the code was exit without any messages. I also tested it on LDAModel and it worked. Is there a bug in DTM on k=1?
The text was updated successfully, but these errors were encountered:
I tested above code but it was breaked. The initial value of K is 1 and it's also possible in official documentation. But at
model.train()
, the code was exit without any messages. I also tested it on LDAModel and it worked. Is there a bug in DTM on k=1?The text was updated successfully, but these errors were encountered: