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
Hi there, I've been trying to change the number of top keywords displayed in the bar chart, from default 30 to 50 (or any other value), and getting some unusual results. Wonder if this is a known bug, or I'm doing something wrong:
When I try to lower the number of Top Most Relevant Terms shown from default 30 to, say, 20 or 10, this works fine in the bar chart:
panel = pyLDAvis.sklearn.prepare(
best_lda_model, corpus_vectorized, vectorizer, mds="tsne", R=20, sort_topics=False
)
By changing R, the bar chart and its title indeed shows 20 top items and their count.
The panel.topic_info DF, however, would show Top 20 keywords for the entire corpus, but about 30+ keywords for each topic.
When I raise R/the number of Top Most Relevant Terms shown from default 30 to, say, 40 or 50, the bar chart and its title would only show the results for the default Top 30 items, instead of Top-40 or Top-50.
When I inspect the panel.topic_info DF for R=50, I do get the top 50 keywords for the entire corpus. But I would get 80+ top keywords for Topic1 and 100+ for another topic.
Are the inconsistencies the result of me setting the R value wrongly, or because of different versions of pandas or other libraries?
I'm using the latest version of pyLDAvis 2.1.2 (sklearn version) on Python 3.6 and 3.7.
Appreciate any help or advice on this. Thank you.
The text was updated successfully, but these errors were encountered:
Hi there, I've been trying to change the number of top keywords displayed in the bar chart, from default 30 to 50 (or any other value), and getting some unusual results. Wonder if this is a known bug, or I'm doing something wrong:
When I try to lower the number of Top Most Relevant Terms shown from default 30 to, say, 20 or 10, this works fine in the bar chart:
panel = pyLDAvis.sklearn.prepare(
best_lda_model, corpus_vectorized, vectorizer, mds="tsne", R=20, sort_topics=False
)
By changing R, the bar chart and its title indeed shows 20 top items and their count.
The panel.topic_info DF, however, would show Top 20 keywords for the entire corpus, but about 30+ keywords for each topic.
When I raise R/the number of Top Most Relevant Terms shown from default 30 to, say, 40 or 50, the bar chart and its title would only show the results for the default Top 30 items, instead of Top-40 or Top-50.
When I inspect the panel.topic_info DF for R=50, I do get the top 50 keywords for the entire corpus. But I would get 80+ top keywords for Topic1 and 100+ for another topic.
Are the inconsistencies the result of me setting the R value wrongly, or because of different versions of pandas or other libraries?
I'm using the latest version of pyLDAvis 2.1.2 (sklearn version) on Python 3.6 and 3.7.
Appreciate any help or advice on this. Thank you.
The text was updated successfully, but these errors were encountered: