class_docstr: Estimate Dynamic Topic Model parameters based on a training corpus.
class_docstr_tok: ["Estimate","Dynamic","Topic","Model","parameters","based","on","a","training","corpus","."]
docstr: Get the coherence for each topic.
  
  Can be used to measure the quality of the model, or to inspect the convergence through training via a callback.
  
  Parameters
  ----------
  time : int
      The time slice.
  
  Returns
  -------
  list of list of str
      The word representation for each topic, for each time slice. This can be used to check the time coherence
      of topics as time evolves: If the most relevant words remain the same then the topic has somehow
      converged or is relatively static, if they change rapidly the topic is evolving.
docstr_tok: ["Get","the","coherence","for","each","topic",".","Can","be","used","to","measure","the","quality","of","the","model",",","or","to","inspect","the","convergence","through","training","via","a","callback",".","Parameters","--","--","--","--","--","time",":","int","The","time","slice",".","Returns","--","--","--","-","list","of","list","of","str","The","word","representation","for","each","topic",",","for","each","time","slice",".","This","can","be","used","to","check","the","time","coherence","of","topics","as","time","evolves",":","If","the","most","relevant","words","remain","the","same","then","the","topic","has","somehow","converged","or","is","relatively","static",",","if","they","change","rapidly","the","topic","is","evolving","."]
code: def dtm_coherence(self, time):
      """Get the coherence for each topic.
  
      Can be used to measure the quality of the model, or to inspect the convergence through training via a callback.
  
      Parameters
      ----------
      time : int
          The time slice.
  
      Returns
      -------
      list of list of str
          The word representation for each topic, for each time slice. This can be used to check the time coherence
          of topics as time evolves: If the most relevant words remain the same then the topic has somehow
          converged or is relatively static, if they change rapidly the topic is evolving.
  
      """
      coherence_topics = []
      for topics in self.print_topics(time):
          coherence_topic = []
          for word, dist in topics:
              coherence_topic.append(word)
          coherence_topics.append(coherence_topic)
  
      return coherence_topics
  
imports: import logging
  import numpy
  from scipy.special import digamma, gammaln
  from scipy import optimize
  from gensim import utils, matutils
  from gensim.models import ldamodel
label_desc: Use image node_id 13 for calling the LdaSeqModel obj's underlying member method code with example usage: obj.dtm_coherence(time) and returns: coherence_topics