Esempio n. 1
0
 def increment(self, k):
     i = mult_sample(self._dish_tables(k))
     if self._seat_to(k, i):
         self.base.increment(k)
Esempio n. 2
0
 def increment(self, k):
     i = mult_sample(self._dish_tables(k))
     if self._seat_to(k, i):
         self.base.increment(k)
Esempio n. 3
0
 def increment(self, doc, word):
     z = mult_sample((k, self.topic_prob(doc, word, k)) for k in xrange(self.n_topics))
     self.assignments[doc, word].append(z)
     self.document_topic[doc].increment(z)
     self.topic_word[z].increment(word)