20769173fc5100fd8b60ca7d77a0b7dd5d6225fd,skbio/tree/_nj.py,,_compute_q,#Any#,172
Before Change
q = np.zeros(dm.shape)
n = dm.shape[0]
for i in range(n):
for j in range(i):
q[i, j] = q[j, i] = \
((n - 2) * dm[i, j]) - dm[i].sum() - dm[j].sum()
return DistanceMatrix(q, dm.ids)
def _compute_collapsed_dm(dm, i, j, disallow_negative_branch_length,
After Change
q = np.zeros(dm.shape)
n = dm.shape[0]
dmv = dm.to_data_frame().values
big_sum = np.array([dmv.sum(1)] * dm.shape[0])
big_sum_diffs = big_sum + big_sum.T
q = (n - 2) * dmv - big_sum_diffs
np.fill_diagonal(q, 0)
return DistanceMatrix(q, dm.ids)
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 8
Instances
Project Name: biocore/scikit-bio
Commit Name: 20769173fc5100fd8b60ca7d77a0b7dd5d6225fd
Time: 2017-04-24
Author: sdbrown@gmail.com
File Name: skbio/tree/_nj.py
Class Name:
Method Name: _compute_q
Project Name: Esri/raster-functions
Commit Name: 372cc580b234724920fee6045e0151abb2b8a823
Time: 2014-09-09
Author: akferoz@esri.com
File Name: Aggregation.py
Class Name: Aggregation
Method Name: updatePixels
Project Name: biocore/scikit-bio
Commit Name: 20769173fc5100fd8b60ca7d77a0b7dd5d6225fd
Time: 2017-04-24
Author: sdbrown@gmail.com
File Name: skbio/tree/_nj.py
Class Name:
Method Name: _compute_q
Project Name: explosion/thinc
Commit Name: b8b71c4fbab9bd9e6a34a18a65474cc1035699de
Time: 2017-01-07
Author: honnibal+gh@gmail.com
File Name: thinc/neural/ops.py
Class Name: Ops
Method Name: softmax
Project Name: ntucllab/libact
Commit Name: c57ce7f891a91592354b1685d37f2aee39f193f2
Time: 2015-10-07
Author: yangarbiter@gmail.com
File Name: libact/query_strategies/active_learning_by_learning.py
Class Name: Exp4P
Method Name: exp4p
Project Name: LCAV/pyroomacoustics
Commit Name: 216fad967ebd8e0df284e2f0e961519321b7a52b
Time: 2019-02-06
Author: ebezzam@gmail.com
File Name: pyroomacoustics/beamforming.py
Class Name: Beamformer
Method Name: process
Project Name: scikit-learn-contrib/DESlib
Commit Name: 4abda80dd12518e6bfdc44d067566a3e6947e906
Time: 2018-03-28
Author: rafaelmenelau@gmail.com
File Name: deslib/dcs/a_priori.py
Class Name: APriori
Method Name: estimate_competence