25ba1b21813a346b303adf045b88803d70ed90fe,skbio/tree/_tree.py,TreeNode,_set_max_distance,#TreeNode#,2315

Before Change


                if len(n.children) == 1:
                    raise TreeError("No support for single descedent nodes")
                else:
                    tip_info = [(max(c.MaxDistTips), c) for c in n.children]

                    dists = [i[0][0] for i in tip_info]
                    best_idx = np.argsort(dists)[-2:]
                    tip_a, child_a = tip_info[best_idx[0]]

After Change


                    tip_info = []
                    for c in n.children:
                        (left_d, _), (right_d, _) = c.MaxDistTips
                        best_idx = np.argmax([left_d, right_d])
                        tip_info.append((c.MaxDistTips[best_idx], c))

                    dists = [i[0][0] for i in tip_info]
                    best_idx = np.argsort(dists)[-2:]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: biocore/scikit-bio
Commit Name: 25ba1b21813a346b303adf045b88803d70ed90fe
Time: 2015-11-30
Author: mcdonadt@colorado.edu
File Name: skbio/tree/_tree.py
Class Name: TreeNode
Method Name: _set_max_distance


Project Name: rasbt/mlxtend
Commit Name: aefd8bcf146d6de8f19fc0c3c5873880bc82886f
Time: 2015-02-23
Author: se.raschka@me.com
File Name: mlxtend/sklearn/ensemble.py
Class Name: EnsembleClassifier
Method Name: predict


Project Name: 13o-bbr-bbq/machine_learning_security
Commit Name: 0bf81caddbc64e81b8b2989e8dbb5a0ec49e489a
Time: 2020-01-08
Author: takaesu235@gmail.com
File Name: Security_and_MachineLearning/src/defensive_chap7/face_auth.py
Class Name:
Method Name: