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 topic mixture for the given document, using the inferred approximation of the true posterior.
  
  Parameters
  ----------
  doc : list of (int, float)
      The doc in BOW format. Can be an unseen document.
  
  Returns
  -------
  list of float
      Probabilities for each topic in the mixture. This is essentially a point in the `num_topics - 1` simplex.
docstr_tok: ["Get","the","topic","mixture","for","the","given","document",",","using","the","inferred","approximation","of","the","true","posterior",".","Parameters","--","--","--","--","--","doc",":","list","of","(","int",",","float",")","The","doc","in","BOW","format",".","Can","be","an","unseen","document",".","Returns","--","--","--","-","list","of","float","Probabilities","for","each","topic","in","the","mixture",".","This","is","essentially","a","point","in","the","`","num_topics","-","1","`","simplex","."]
code: def __getitem__(self, doc):
      """Get the topic mixture for the given document, using the inferred approximation of the true posterior.
  
      Parameters
      ----------
      doc : list of (int, float)
          The doc in BOW format. Can be an unseen document.
  
      Returns
      -------
      list of float
          Probabilities for each topic in the mixture. This is essentially a point in the `num_topics - 1` simplex.
  
      """
      lda_model = ldamodel.LdaModel(
          num_topics=self.num_topics,
          alpha=self.alphas,
          id2word=self.id2word,
          dtype=np.float64,
      )
      lda_model.topics = np.zeros((self.vocab_len, self.num_topics))
      ldapost = LdaPost(
          num_topics=self.num_topics,
          max_doc_len=len(doc),
          lda=lda_model,
          doc=doc,
      )
  
      time_lhoods = []
      for time in range(self.num_time_slices):
          lda_model = self.make_lda_seq_slice(
              lda_model, time
          )  # create lda_seq slice
          lhood = LdaPost.fit_lda_post(ldapost, 0, time, self)
          time_lhoods.append(lhood)
  
      doc_topic = ldapost.gamma / ldapost.gamma.sum()
      # should even the likelihoods be returned?
      return doc_topic
  
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 14 for calling the LdaSeqModel obj's underlying member method code with example usage: obj.__getitem__(doc) and returns: doc_topic