764b22136f964c50bcf7d30c4f1efe6bdaabd50b,src/BayesianModel/BayesianModel.py,BayesianModel,_get_ancestors_observation,#BayesianModel#Any#,736

Before Change


        obs_list = [obs for obs in observation]
        ancestors_list = []
        while obs_list:
            node = obs_list.pop()
            if node not in ancestors_list:
                obs_list += self.predecessors(node)
            ancestors_list += [node]
        return ancestors_list

    def _get_observed_list(self):
        

After Change


        Returns a list of all ancestors of all the observed nodes.
        
        ancestors_list = set()
        for node in observed_list:
            for predecessor in self.predecessors(node):
                ancestors_list.add(predecessor)
        return ancestors_list

    def _get_observed_list(self):
        
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pgmpy/pgmpy
Commit Name: 764b22136f964c50bcf7d30c4f1efe6bdaabd50b
Time: 2014-01-08
Author: ankurankan@gmail.com
File Name: src/BayesianModel/BayesianModel.py
Class Name: BayesianModel
Method Name: _get_ancestors_observation


Project Name: keras-team/keras
Commit Name: 57612707c1434ed3b18f9cad5cf2e6dd8b7b3b7d
Time: 2015-11-02
Author: roller@cs.utexas.edu
File Name: keras/layers/core.py
Class Name: Merge
Method Name: __init__


Project Name: ray-project/ray
Commit Name: 75dfae84e40d62124b3622da07f06ff1cc26d496
Time: 2021-03-19
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/serve/backend_state.py
Class Name: BackendState
Method Name: _scale_backend_replicas