a0021cb982c25923a75cd3a1eeaee00058f2cdbb,pixyz/distributions/distributions.py,DistGraph,var_replaced,#DistGraph#Any#Any#,75

Before Change


            unknown_var = [var_name for var_name in replace_dict.keys() if var_name not in self.graph]
            raise ValueError(f"replace_dict has unknown variables: {unknown_var}")
        if not set(replace_dict.values()).isdisjoint(set(self.graph)):
            used_var = [var_name for var_name in replace_dict.values() if var_name in self.graph]
            raise ValueError(f"{used_var} is already used in this distribution.")
        if not name:
            name = self.name

After Change


        result.global_option = dict(self.global_option)

        for factor in result.factors():
            if set(replace_dict.values()).isdisjoint(list(result.graph.pred[factor]) + list(result.graph.succ[factor])):
                continue
            factor.rename_var(replace_dict)
        return result

    def _factors_from_variable(self, var_name):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: masa-su/pixyz
Commit Name: a0021cb982c25923a75cd3a1eeaee00058f2cdbb
Time: 2020-07-27
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: DistGraph
Method Name: var_replaced


Project Name: masa-su/pixyz
Commit Name: a0021cb982c25923a75cd3a1eeaee00058f2cdbb
Time: 2020-07-27
Author: kaneko@weblab.t.u-tokyo.ac.jp
File Name: pixyz/distributions/distributions.py
Class Name: DistGraph
Method Name: var_replaced


Project Name: geomstats/geomstats
Commit Name: 569c4e56647aee986f123794a793abab7f1cc55c
Time: 2018-01-29
Author: ninamio78@gmail.com
File Name: tests/test_special_euclidean_group.py
Class Name: TestSpecialEuclideanGroupMethods
Method Name: test_group_log_then_exp


Project Name: pfnet/optuna
Commit Name: 440c2bc25fdc60cd6ccb491f20c8741a009ce9a7
Time: 2020-12-02
Author: hiroyuki.vincent.yamazaki@gmail.com
File Name: optuna/importance/_mean_decrease_impurity.py
Class Name: MeanDecreaseImpurityImportanceEvaluator
Method Name: evaluate