class_docstr: Encapsulate the inner State Space Language Model for DTM.
  
  Some important attributes of this class:
  
      * `obs` is a matrix containing the document to topic ratios.
      * `e_log_prob` is a matrix containing the topic to word ratios.
      * `mean` contains the mean values to be used for inference for each word for a time slice.
      * `variance` contains the variance values to be used for inference of word in a time slice.
      * `fwd_mean` and`fwd_variance` are the forward posterior values for the mean and the variance.
      * `zeta` is an extra variational parameter with a value for each time slice.
class_docstr_tok: ["Encapsulate","the","inner","State","Space","Language","Model","for","DTM",".","Some","important","attributes","of","this","class",":","*","`","obs","`","is","a","matrix","containing","the","document","to","topic","ratios",".","*","`","e_log_prob","`","is","a","matrix","containing","the","topic","to","word","ratios",".","*","`","mean","`","contains","the","mean","values","to","be","used","for","inference","for","each","word","for","a","time","slice",".","*","`","variance","`","contains","the","variance","values","to","be","used","for","inference","of","word","in","a","time","slice",".","*","`","fwd_mean","`","and","`","fwd_variance","`","are","the","forward","posterior","values","for","the","mean","and","the","variance",".","*","`","zeta","`","is","an","extra","variational","parameter","with","a","value","for","each","time","slice","."]
docstr: Initialize the State Space Language Model with LDA sufficient statistics.
  
  Called for each topic-chain and initializes initial mean, variance and Topic-Word probabilities
  for the first time-slice.
  
  Parameters
  ----------
  obs_variance : float, optional
      Observed variance used to approximate the true and forward variance.
  chain_variance : float
      Gaussian parameter defined in the beta distribution to dictate how the beta values evolve over time.
  sstats : numpy.ndarray
      Sufficient statistics of the LDA model. Corresponds to matrix beta in the linked paper for time slice 0,
      expected shape (`self.vocab_len`, `num_topics`).
docstr_tok: ["Initialize","the","State","Space","Language","Model","with","LDA","sufficient","statistics",".","Called","for","each","topic-chain","and","initializes","initial","mean",",","variance","and","Topic-Word","probabilities","for","the","first","time-slice",".","Parameters","--","--","--","--","--","obs_variance",":","float",",","optional","Observed","variance","used","to","approximate","the","true","and","forward","variance",".","chain_variance",":","float","Gaussian","parameter","defined","in","the","beta","distribution","to","dictate","how","the","beta","values","evolve","over","time",".","sstats",":","numpy.ndarray","Sufficient","statistics","of","the","LDA","model",".","Corresponds","to","matrix","beta","in","the","linked","paper","for","time","slice","0",",","expected","shape","(","`","self.vocab_len","`",",","`","num_topics","`",")","."]
code: def sslm_counts_init(self, obs_variance, chain_variance, sstats):
      """Initialize the State Space Language Model with LDA sufficient statistics.
  
      Called for each topic-chain and initializes initial mean, variance and Topic-Word probabilities
      for the first time-slice.
  
      Parameters
      ----------
      obs_variance : float, optional
          Observed variance used to approximate the true and forward variance.
      chain_variance : float
          Gaussian parameter defined in the beta distribution to dictate how the beta values evolve over time.
      sstats : numpy.ndarray
          Sufficient statistics of the LDA model. Corresponds to matrix beta in the linked paper for time slice 0,
          expected shape (`self.vocab_len`, `num_topics`).
  
      """
      W = self.vocab_len
      T = self.num_time_slices
  
      log_norm_counts = np.copy(sstats)
      log_norm_counts /= sum(log_norm_counts)
      log_norm_counts += 1.0 / W
      log_norm_counts /= sum(log_norm_counts)
      log_norm_counts = np.log(log_norm_counts)
  
      # setting variational observations to transformed counts
      self.obs = (np.repeat(log_norm_counts, T, axis=0)).reshape(W, T)
      # set variational parameters
      self.obs_variance = obs_variance
      self.chain_variance = chain_variance
  
      # compute post variance, mean
      for w in range(W):
          (
              self.variance[w],
              self.fwd_variance[w],
          ) = self.compute_post_variance(w, self.chain_variance)
          self.mean[w], self.fwd_mean[w] = self.compute_post_mean(
              w, self.chain_variance
          )
  
      self.zeta = self.update_zeta()
      self.e_log_prob = self.compute_expected_log_prob()
  
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 6 for calling the sslm obj's underlying member method code with example usage: obj.sslm_counts_init(obs_variance, chain_variance, sstats) without return types