'Initialize latent variables.'

def _init_latent_vars(self, n_features):

    self.random_state_ = check_random_state(self.random_state)
    self.n_batch_iter_ = 1
    self.n_iter_ = 0
    if (self.doc_topic_prior is None):
        self.doc_topic_prior_ = (1.0 / self._n_components)
    else:
        self.doc_topic_prior_ = self.doc_topic_prior
    if (self.topic_word_prior is None):
        self.topic_word_prior_ = (1.0 / self._n_components)
    else:
        self.topic_word_prior_ = self.topic_word_prior
    init_gamma = 100.0
    init_var = (1.0 / init_gamma)
    self.components_ = self.random_state_.gamma(init_gamma, init_var, (self._n_components, n_features))
    self.exp_dirichlet_component_ = np.exp(_dirichlet_expectation_2d(self.components_))
