Slide 12
Slide 12 text
Περιγραφή αλγορίθμου
— Transform to Document Term Matrix structure, LDA
tf = CountVectorizer(strip_accents='unicode',
max_df=0.95, min_df=2,stop_words=None)
tfs1 = tf.fit_transform(tokens.values())
num = 8
model = lda.LDA(n_topics=num, n_iter=500,
random_state=1)
model.fit_transform(tfs1)
topic_word = model.topic_word_
vocab = tf.get_feature_names()