aab1e5b638029c3398d7fb557abbecee51abf53a,Tars/distributions/distributions.py,RelaxedBernoulli,log_likelihood,#RelaxedBernoulli#Any#,474
Before Change
if not set(list(x.keys())) >= set(self._cond_var + self._var):
raise ValueError("Input"s keys are not valid.")
if len(self._cond_var) > 0: // c onditional distribution
_x = get_dict_values(x, self._cond_var, True)
self._set_distribution(_x, sampling=False)
After Change
parents_x = get_dict_values(
x, self._parents_var.cond_var + self._parents_var.var,
return_dict=True)
children_x = get_dict_values(
x, self._children_var.cond_var + self._children_var.var,
return_dict=True)
return self._parents_var.log_likelihood(parents_x) +\
self._children_var.log_likelihood(children_x)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: masa-su/pixyz
Commit Name: aab1e5b638029c3398d7fb557abbecee51abf53a
Time: 2018-10-23
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: Tars/distributions/distributions.py
Class Name: RelaxedBernoulli
Method Name: log_likelihood
Project Name: masa-su/pixyz
Commit Name: 2e191e4dcb7b3de9fd6d2637f6cb9713e35fe082
Time: 2019-01-27
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: DistributionBase
Method Name: sample
Project Name: masa-su/pixyz
Commit Name: 499a447ca672704910f31e04f6d88907e1b75ce6
Time: 2019-01-27
Author: masa@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/special_distributions.py
Class Name: Deterministic
Method Name: sample