Visualization

tmplot.report(model: object, docs: Sequence[str], *, topics_labels: Sequence[str] | None = None, corpus: List | None = None, layout: Layout = None, show_headers: bool = True, show_docs: bool = True, show_words: bool = True, show_topics: bool = True, topics_kws: dict = None, height: int = 500, width: int = 300, coords_kws: dict = None, words_kws: dict = None, docs_kws: dict = None, top_docs_kws: dict = 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.

  • 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, dist_kws: dict = None, scatter_kws: dict = None) DataFrame

Prepare coordinates for topics scatter plot.

Parameters:
  • model (object) – Topic model instance.

  • labels (Optional[Sequence]) – Topics labels.

  • dist_kws (dict, optional) – Keyword arguments passed to tmplot.get_topics_dist().

  • scatter_kws (dict, optional) – Keyword arguments passed to tmplot.get_topics_scatter().