def perplexity(self):

        """
        Compute perplexity for each sample.
        """

        return samplers_lda.perplexity_comp(self.docid, self.tokens,
                                            self.tt, self.dt, self.N,
                                            self.K, self.samples)
Compute perplexity for each sample.