Visualization
- tmplot.report(model: object, docs: Sequence[str], *, topics_labels: Sequence[str] | None = None, corpus: List | None = None, layout: Layout | None = None, show_headers: bool = True, show_docs: bool = True, show_words: bool = True, show_topics: bool = True, topics_kws: dict | None = None, height: int = 500, width: int = 300, coords_kws: dict | None = None, words_kws: dict | None = None, docs_kws: dict | None = None, top_docs_kws: dict | None = None) VBox
Interactive report interface.
- Parameters:
model (object) – Topic model instance.
docs (Sequence[str]) – Documents.
topics_labels (Optional[Sequence[str]], optional) – Topics labels.
corpus (Optional[List[str]], optional) – Gensim corpus (must be specified if you are using a gensim model).
layout (wdg.Layout, optional) – Interface layout instance.
show_headers (bool, optional) – Show headers.
show_docs (bool, optional) – Show documents widget.
show_words (bool, optional) – Show words widget.
show_topics (bool, optional) – Show topics scatter plot widget.
topics_kws (dict, optional) – Keyword arguments passed to
tmplot.plot_scatter_topics().coords_kws (dict, optional) – Keyword arguments passed to
tmplot.prepare_coords().words_kws (dict, optional) – Keyword arguments passed to
tmplot.plot_terms().docs_kws (dict, optional) – Keyword arguments passed to
tmplot.plot_docs().top_docs_kws (dict, optional) – Keyword arguments passed to
tmplot.get_top_docs().
- Returns:
Report interface as a VBox instance.
- Return type:
ipywidgets.widgets.widget_box.VBox
- tmplot.prepare_coords(model: object, labels: Sequence | None = None, corpus: List | None = None, dist_kws: Dict | None = None, scatter_kws: Dict | None = None) DataFrame
Prepare coordinates for topics scatter plot.
- Parameters:
model (object) – Topic model instance.
labels (Optional[Sequence]) – Topics labels.
corpus (Optional[List], optional) – Corpus (must be specified for a gensim model).
dist_kws (dict, optional) – Keyword arguments passed to
tmplot.get_topics_dist().scatter_kws (dict, optional) – Keyword arguments passed to
tmplot.get_topics_scatter().