Beispiel #1
0
 def i_logp(self, index):
     """
     Evaluates the log-probability of the Markov blanket of
     a stochastic owning a particular index.
     """
     all_relevant_stochastics = set()
     p,i = self.stochastic_indices[index]
     try:
         return p.logp + logp_of_set(p.extended_children)
     except ZeroProbability:
         return -Inf
Beispiel #2
0
 def get_logp_plus_loglike(self):
     return logp_of_set(self.variables_with_logp)
Beispiel #3
0
 def _get_logp_plus_loglike(self):
     sum = logp_of_set(self.markov_blanket)
     if self.verbose>1:
         print '\t' + self._id + ' Current log-likelihood plus current log-probability', sum
     return sum
Beispiel #4
0
 def _get_loglike(self):
     # Fetch log-probability (as sum of childrens' log probability)
     sum = logp_of_set(self.children)
     if self.verbose>1:
         print '\t' + self._id + ' Current log-likelihood ', sum
     return sum
Beispiel #5
0
 def get_logp_plus_loglike(self):
     return logp_of_set(self.variables_with_logp)
Beispiel #6
0
 def _get_logp_plus_loglike(self):
     sum = logp_of_set(self.markov_blanket)
     if self.verbose>1:
         print '\t' + self._id + ' Current log-likelihood plus current log-probability', sum
     return sum
Beispiel #7
0
 def _get_loglike(self):
     # Fetch log-probability (as sum of childrens' log probability)
     sum = logp_of_set(self.children)
     if self.verbose>1:
         print '\t' + self._id + ' Current log-likelihood ', sum
     return sum