e022ffad2e378bb2cdcea12114b18d47f53256d4,skbio/maths/gradient.py,BaseVectors,get_vectors,#BaseVectors#,187

Before Change



    def get_vectors(self):
        
        vector_results = defaultdict(dict)
        // Loop through all the categories that we should compute the vectors
        for cat, cat_groups in self._groups.iteritems():
            // Loop through all the category values present
            // in the current category
            for cat_value, sample_ids in cat_groups.iteritems():
                // Compute the vector for the current category value
                vector_results[cat][cat_value] = self._get_subgroup_vectors(
                    sample_ids)
        return vector_results

After Change



    def get_vectors(self):
        
        result = VectorsResults(self._alg_name, self._weighted, [])
        // Loop through all the categories that we should compute the vectors
        for cat, cat_groups in self._groups.iteritems():
            // Loop through all the category values present
            // in the current category
            res_by_group = []
            for cat_value, sample_ids in cat_groups.iteritems():
                // Compute the vector for the current category value
                res_by_group.append(self._get_group_vectors(cat_value,
                                                            sample_ids))
                // result[cat][cat_value] = self._get_group_vectors(
                //     sample_ids)
            result.categories.append(self._test_vectors(cat, res_by_group))

        return result

    def _test_vectors(self, category, res_by_group):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: biocore/scikit-bio
Commit Name: e022ffad2e378bb2cdcea12114b18d47f53256d4
Time: 2014-05-08
Author: josenavasmolina@gmail.com
File Name: skbio/maths/gradient.py
Class Name: BaseVectors
Method Name: get_vectors


Project Name: pantsbuild/pants
Commit Name: bb567f578ac20d7e6ef1990018a55f4f3bff61f6
Time: 2014-05-26
Author: itykaul@gmail.com
File Name: src/python/pants/tasks/detect_duplicates.py
Class Name: DuplicateDetector
Method Name: detect_duplicates_for_target


Project Name: ray-project/ray
Commit Name: 732197e23a937b7b6d196936519c16ec6317ea9f
Time: 2021-03-08
Author: sven@anyscale.io
File Name: rllib/execution/train_ops.py
Class Name: TrainTFMultiGPU
Method Name: __call__