1a895914343d520c260f53eb32ec91d4e75c9fe3,pixyz/distributions/distributions.py,MultiplyDistribution,__init__,#MultiplyDistribution#Any#Any#,883

Before Change


        // Check if variables of two distributions are "recursive" (e.g. p(x|z)p(z|x)).
        _check_recursive_vars = _child.var + _parent.cond_var
        if len(_check_recursive_vars) != len(set(_check_recursive_vars)):
            raise ValueError("Variables of two distributions, {} and {}, are recursive.".format(_child.prob_text,
                                                                                                _parent.prob_text))

        // Set variables.
        _var = _child.var + _parent.var
        if len(_var) != len(set(_var)):  // e.g. p(x|z)p(x|y)
            raise ValueError("Variables of two distributions, {} and {}, are conflicted.".format(_child.prob_text,
                                                                                                 _parent.prob_text))

        // Set conditional variables.
        _cond_var = _child.cond_var + _parent.cond_var
        _cond_var = sorted(set(_cond_var), key=_cond_var.index)

After Change


        // Check if variables of two distributions are "recursive" (e.g. p(x|z)p(z|x)).
        _check_recursive_vars = _child.var + _parent.cond_var
        if len(_check_recursive_vars) != len(set(_check_recursive_vars)):
            raise ValueError(f"Variables of two distributions,"
                             f" {_child.prob_text} and {_parent.prob_text}, are recursive.")

        // Set variables.
        _var = _child.var + _parent.var
        if len(_var) != len(set(_var)):  // e.g. p(x|z)p(x|y)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: masa-su/pixyz
Commit Name: 1a895914343d520c260f53eb32ec91d4e75c9fe3
Time: 2020-01-19
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: MultiplyDistribution
Method Name: __init__


Project Name: masa-su/pixyz
Commit Name: 198383114acc0a54c632e12eeb426c9dfb58bc9c
Time: 2020-01-14
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: MultiplyDistribution
Method Name: __init__


Project Name: masa-su/pixyz
Commit Name: 1a895914343d520c260f53eb32ec91d4e75c9fe3
Time: 2020-01-19
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: MultiplyDistribution
Method Name: __init__


Project Name: pytorch/ignite
Commit Name: 62f82c45fff316da25968228502f2960b4d14b95
Time: 2020-12-22
Author: uribgp@gmail.com
File Name: ignite/metrics/ssim.py
Class Name: SSIM
Method Name: update