mira.pl.plot_topic_contributions#

mira.pl.plot_topic_contributions(topic_contributions, highlight_topics, palette=['red', 'black'], min_threshold=0.05, figsize=(5, 3), ax=None, size=10, **plot_kwargs)#

Utility plot for choosing representative number of topics for a dataset in conjuction with the gradient_tune method.

Parameters
topic_contributionslist

Output from mira.topics.gradient_tune. Sorted list of maximum topic contributions.

highlight_topicsint > 0

Number of topics to highlight on plot. Helps to choose the number of topics corresponding with the “elbow”.

min_treshold ; float in (0,1), default = 0.05

Threshold line to draw across plot.