class_docstr: Metric class for perplexity evaluation.
class_docstr_tok: ["Metric","class","for","perplexity","evaluation","."]
docstr: Parameters
  ----------
  corpus : {iterable of list of (int, float), scipy.sparse.csc}, optional
      Stream of document vectors or sparse matrix of shape (`num_documents`, `num_terms`).
  logger : {'shell', 'visdom'}, optional
     Monitor training process using one of the available methods. 'shell' will print the perplexity value in
     the active shell, while 'visdom' will visualize the coherence value with increasing epochs using the Visdom
     visualization framework.
  viz_env : object, optional
      Visdom environment to use for plotting the graph. Unused.
  title : str, optional
      Title of the graph plot in case `logger == 'visdom'`. Unused.
docstr_tok: ["Parameters","--","--","--","--","--","corpus",":","{","iterable","of","list","of","(","int",",","float",")",",","scipy.sparse.csc","}",",","optional","Stream","of","document","vectors","or","sparse","matrix","of","shape","(","`","num_documents","`",",","`","num_terms","`",")",".","logger",":","{","'shell","'",",","'visdom","'","}",",","optional","Monitor","training","process","using","one","of","the","available","methods",".","'shell","'","will","print","the","perplexity","value","in","the","active","shell",",","while","'visdom","'","will","visualize","the","coherence","value","with","increasing","epochs","using","the","Visdom","visualization","framework",".","viz_env",":","object",",","optional","Visdom","environment","to","use","for","plotting","the","graph",".","Unused",".","title",":","str",",","optional","Title","of","the","graph","plot","in","case","`","logger","==","'visdom","'","`",".","Unused","."]
code: def __init__(
      self, corpus=None, logger=None, viz_env=None, title=None
  ):
      """
  
      Parameters
      ----------
      corpus : {iterable of list of (int, float), scipy.sparse.csc}, optional
          Stream of document vectors or sparse matrix of shape (`num_documents`, `num_terms`).
      logger : {'shell', 'visdom'}, optional
         Monitor training process using one of the available methods. 'shell' will print the perplexity value in
         the active shell, while 'visdom' will visualize the coherence value with increasing epochs using the Visdom
         visualization framework.
      viz_env : object, optional
          Visdom environment to use for plotting the graph. Unused.
      title : str, optional
          Title of the graph plot in case `logger == 'visdom'`. Unused.
  
      """
      self.corpus = corpus
      self.logger = logger
      self.viz_env = viz_env
      self.title = title
  
imports: import gensim
  import logging
  import copy
  import sys
  import numpy
label_desc: Use image node_id 1 to create a new PerplexityMetric object from inherited base classes: Metric with example: obj = PerplexityMetric(corpus, logger, viz_env, title)