def _vlb(self):
vlb = 0.
vlb += sum(l.get_vlb() for l in self.labels_list)
vlb += self.weights.get_vlb()
vlb += sum(c.get_vlb() for c in self.components)
for l in self.labels_list:
vlb += np.sum([r.dot(c.expected_log_likelihood(l.data))
for c,r in zip(self.components, l.r.T)])
# add in symmetry factor (if we're actually symmetric)
if len(set(type(c) for c in self.components)) == 1:
vlb += special.gammaln(len(self.components)+1)
return vlb
### SVI
评论列表
文章目录