class_docstr: Posterior values associated with each set of documents.
  
  TODO: use **Hoffman, Blei, Bach: Online Learning for Latent Dirichlet Allocation, NIPS 2010.**
  to update phi, gamma. End game would be to somehow replace LdaPost entirely with LdaModel.
class_docstr_tok: ["Posterior","values","associated","with","each","set","of","documents",".","TODO",":","use","*","*","Hoffman",",","Blei",",","Bach",":","Online","Learning","for","Latent","Dirichlet","Allocation",",","NIPS","2010",".","*","*","to","update","phi",",","gamma",".","End","game","would","be","to","somehow","replace","LdaPost","entirely","with","LdaModel","."]
docstr: Update variational dirichlet parameters.
  
  This operations is described in the original Blei LDA paper:
  gamma = alpha + sum(phi), over every topic for every word.
  
  Returns
  -------
  list of float
      The updated gamma parameters for each word in the document.
docstr_tok: ["Update","variational","dirichlet","parameters",".","This","operations","is","described","in","the","original","Blei","LDA","paper",":","gamma","=","alpha","+","sum","(","phi",")",",","over","every","topic","for","every","word",".","Returns","--","--","--","-","list","of","float","The","updated","gamma","parameters","for","each","word","in","the","document","."]
code: def update_gamma(self):
      """Update variational dirichlet parameters.
  
      This operations is described in the original Blei LDA paper:
      gamma = alpha + sum(phi), over every topic for every word.
  
      Returns
      -------
      list of float
          The updated gamma parameters for each word in the document.
  
      """
      self.gamma = np.copy(self.lda.alpha)
      n = 0  # keep track of number of iterations for phi, log_phi
      for word_id, count in self.doc:
          phi_row = self.phi[n]
          for k in range(self.lda.num_topics):
              self.gamma[k] += phi_row[k] * count
          n += 1
  
      return self.gamma
  
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 3 for calling the LdaPost obj's underlying member method code with example usage: obj.update_gamma() and returns: self