class_docstr: Model for `Latent Semantic Indexing
  <https://en.wikipedia.org/wiki/Latent_semantic_analysis#Latent_semantic_indexing>`_.
  
  The decomposition algorithm is described in `"Fast and Faster: A Comparison of Two Streamed
  Matrix Decomposition Algorithms" <https://arxiv.org/pdf/1102.5597.pdf>`_.
  
  Notes
  -----
  * :attr:`gensim.models.lsimodel.LsiModel.projection.u` - left singular vectors,
  * :attr:`gensim.models.lsimodel.LsiModel.projection.s` - singular values,
  * ``model[training_corpus]`` - right singular vectors (can be reconstructed if needed).
  
  See Also
  --------
  `FAQ about LSI matrices
  <https://github.com/RaRe-Technologies/gensim/wiki/Recipes-&-FAQ#q4-how-do-you-output-the-u-s-vt-matrices-of-lsi>`_.
  
  Examples
  --------
  .. sourcecode:: pycon
  
      >>> from gensim.test.utils import common_corpus, common_dictionary, get_tmpfile
      >>> from gensim.models import LsiModel
      >>>
      >>> model = LsiModel(common_corpus[:3], id2word=common_dictionary)  # train model
      >>> vector = model[common_corpus[4]]  # apply model to BoW document
      >>> model.add_documents(common_corpus[4:])  # update model with new documents
      >>> tmp_fname = get_tmpfile("lsi.model")
      >>> model.save(tmp_fname)  # save model
      >>> loaded_model = LsiModel.load(tmp_fname)  # load model
class_docstr_tok: ["Model","for","`","Latent","Semantic","Indexing","<","https",":","\/\/en.wikipedia.org\/wiki\/Latent_semantic_analysis","#","Latent_semantic_indexing",">","`","_",".","The","decomposition","algorithm","is","described","in","`","``","Fast","and","Faster",":","A","Comparison","of","Two","Streamed","Matrix","Decomposition","Algorithms","''","<","https",":","\/\/arxiv.org\/pdf\/1102.5597.pdf",">","`","_",".","Notes","--","--","-","*",":","attr",":","`","gensim.models.lsimodel.LsiModel.projection.u","`","-","left","singular","vectors",",","*",":","attr",":","`","gensim.models.lsimodel.LsiModel.projection.s","`","-","singular","values",",","*","``","model","[","training_corpus","]","``","-","right","singular","vectors","(","can","be","reconstructed","if","needed",")",".","See","Also","--","--","--","--","`","FAQ","about","LSI","matrices","<","https",":","\/\/github.com\/RaRe-Technologies\/gensim\/wiki\/Recipes-","&","-FAQ","#","q4-how-do-you-output-the-u-s-vt-matrices-of-lsi",">","`","_",".","Examples","--","--","--","--","..","sourcecode",":",":","pycon",">",">",">","from","gensim.test.utils","import","common_corpus",",","common_dictionary",",","get_tmpfile",">",">",">","from","gensim.models","import","LsiModel",">",">",">",">",">",">","model","=","LsiModel","(","common_corpus","[",":3","]",",","id2word=common_dictionary",")","#","train","model",">",">",">","vector","=","model","[","common_corpus","[","4","]","]","#","apply","model","to","BoW","document",">",">",">","model.add_documents","(","common_corpus","[","4",":","]",")","#","update","model","with","new","documents",">",">",">","tmp_fname","=","get_tmpfile","(","``","lsi.model","''",")",">",">",">","model.save","(","tmp_fname",")","#","save","model",">",">",">","loaded_model","=","LsiModel.load","(","tmp_fname",")","#","load","model"]
docstr: Get the most significant topics.
  
  Parameters
  ----------
  num_topics : int, optional
      The number of topics to be selected, if -1 - all topics will be in result (ordered by significance).
  num_words : int, optional
      The number of words to be included per topics (ordered by significance).
  log : bool, optional
      If True - log topics with logger.
  formatted : bool, optional
      If True - each topic represented as string, otherwise - in BoW format.
  
  Returns
  -------
  list of (int, str)
      If `formatted=True`, return sequence with (topic_id, string representation of topics) **OR**
  list of (int, list of (str, float))
      Otherwise, return sequence with (topic_id, [(word, value), ... ]).
docstr_tok: ["Get","the","most","significant","topics",".","Parameters","--","--","--","--","--","num_topics",":","int",",","optional","The","number","of","topics","to","be","selected",",","if","-1","-","all","topics","will","be","in","result","(","ordered","by","significance",")",".","num_words",":","int",",","optional","The","number","of","words","to","be","included","per","topics","(","ordered","by","significance",")",".","log",":","bool",",","optional","If","True","-","log","topics","with","logger",".","formatted",":","bool",",","optional","If","True","-","each","topic","represented","as","string",",","otherwise","-","in","BoW","format",".","Returns","--","--","--","-","list","of","(","int",",","str",")","If","`","formatted=True","`",",","return","sequence","with","(","topic_id",",","string","representation","of","topics",")","*","*","OR","*","*","list","of","(","int",",","list","of","(","str",",","float",")",")","Otherwise",",","return","sequence","with","(","topic_id",",","[","(","word",",","value",")",",","...","]",")","."]
code: def show_topics(
      self, num_topics=-1, num_words=10, log=False, formatted=True
  ):
      """Get the most significant topics.
  
      Parameters
      ----------
      num_topics : int, optional
          The number of topics to be selected, if -1 - all topics will be in result (ordered by significance).
      num_words : int, optional
          The number of words to be included per topics (ordered by significance).
      log : bool, optional
          If True - log topics with logger.
      formatted : bool, optional
          If True - each topic represented as string, otherwise - in BoW format.
  
      Returns
      -------
      list of (int, str)
          If `formatted=True`, return sequence with (topic_id, string representation of topics) **OR**
      list of (int, list of (str, float))
          Otherwise, return sequence with (topic_id, [(word, value), ... ]).
  
      """
      shown = []
      if num_topics < 0:
          num_topics = self.num_topics
      for i in range(min(num_topics, self.num_topics)):
          if i < len(self.projection.s):
              if formatted:
                  topic = self.print_topic(i, topn=num_words)
              else:
                  topic = self.show_topic(i, topn=num_words)
              shown.append((i, topic))
              if log:
                  logger.info(
                      "topic #%i(%.3f): %s",
                      i,
                      self.projection.s[i],
                      topic,
                  )
      return shown
  
imports: import logging
  import sys
  import time
  import numpy
  import scipy.linalg
  import scipy.sparse
  from scipy.sparse import sparsetools
  from gensim import interfaces, matutils, utils
  from gensim.models import basemodel
  from gensim.utils import is_empty
label_desc: Use image node_id 7 for calling the LsiModel obj's underlying member method code with example usage: obj.show_topics(num_topics, num_words, log, formatted) and returns: shown