1cc277630f2381f2ba0f01dcf833801a830f5c3b,skimage/metrics/_contingency_table.py,,contingency_table,#,7
Before Change
im_test_r = im_test.ravel()
im_true_r = im_true.ravel()
ignored = np.zeros(im_true_r.shape, np.bool)
for label in ignore_labels:
ignored[im_true_r == label] = True
data = np.ones(im_true_r.shape)
data[ignored] = 0
if normalize:
data = data / im_true.size
After Change
if ignore_labels is None:
ignore_labels = []
im_test_r = im_test.reshape(-1)
im_true_r = im_true.reshape(-1)
data = np.isin(im_true_r, ignore_labels, invert=True).astype(float)
if normalize:
data /= np.count_nonzero(data)
cont = sparse.coo_matrix((data, (im_true_r, im_test_r))).tocsr()
return cont
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: scikit-image/scikit-image
Commit Name: 1cc277630f2381f2ba0f01dcf833801a830f5c3b
Time: 2020-08-04
Author: rfezzani@gmail.com
File Name: skimage/metrics/_contingency_table.py
Class Name:
Method Name: contingency_table
Project Name: scikit-optimize/scikit-optimize
Commit Name: 4af750bec058da0cf5d4a3245a443549b9d7fd33
Time: 2016-04-05
Author: manojkumarsivaraj334@gmail.com
File Name: skopt/dummy_opt.py
Class Name:
Method Name: dummy_minimize
Project Name: jacobgil/pytorch-grad-cam
Commit Name: 5890d98d650b9bf3c1824f48fec96ad90c94fbbb
Time: 2020-01-11
Author: jacob.gildenblat@gmail.com
File Name: grad-cam.py
Class Name:
Method Name: