b60e3ad9b7c9ca78caee795618a6d87e4ca6c6c3,test/test_nearmiss.py,,,#,7

Before Change


// nm3x = pca.transform(nm3x)
// cnnx = pca.transform(cnnx)
// ossx = pca.transform(ossx)
ncrx = pca.transform(ncrx)

// plt.figure()
// plt.scatter(nm1x[nm1y==0, 0], nm1x[nm1y==0, 1])
// plt.scatter(nm1x[nm1y==1, 0], nm1x[nm1y==1, 1], color="r")
// plt.show()

// plt.figure()
// plt.scatter(nm2x[nm2y==0, 0], nm2x[nm2y==0, 1])
// plt.scatter(nm2x[nm2y==1, 0], nm2x[nm2y==1, 1], color="r")
// plt.show()

// plt.figure()
// plt.scatter(nm3x[nm3y==0, 0], nm3x[nm3y==0, 1])
// plt.scatter(nm3x[nm3y==1, 0], nm3x[nm3y==1, 1], color="r")
// plt.show()

// plt.figure()
// plt.scatter(cnnx[cnny==0, 0], cnnx[cnny==0, 1])
// plt.scatter(cnnx[cnny==1, 0], cnnx[cnny==1, 1], color="r")
// plt.show()

// plt.figure()
// plt.scatter(ossx[ossy==0, 0], ossx[ossy==0, 1])
// plt.scatter(ossx[ossy==1, 0], ossx[ossy==1, 1], color="r")
// plt.show()

plt.figure()
plt.scatter(ncrx[ncry==0, 0], ncrx[ncry==0, 1])
plt.scatter(ncrx[ncry==1, 0], ncrx[ncry==1, 1], color="r")
plt.show()

After Change


                           n_features=20, n_clusters_per_class=1,\
                           n_samples=5000, random_state=10)

r = float(np.count_nonzero(y == 1)) / float(np.count_nonzero(y == 0))

// // Try NearMiss algorithm
// NM1 = NearMiss(random_state=1, version=1, metric="l1")
// nm1x, nm1y = NM1.fit_transform(x, y)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: b60e3ad9b7c9ca78caee795618a6d87e4ca6c6c3
Time: 2015-05-26
Author: glemaitre@visor.udg.edu
File Name: test/test_nearmiss.py
Class Name:
Method Name:


Project Name: biotite-dev/biotite
Commit Name: 2af5e1f168272e51a1649e5d737d2e5a3433b5a2
Time: 2020-11-26
Author: anter.jacob@gmail.com
File Name: src/biotite/structure/charges.py
Class Name:
Method Name: partial_charges


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: theislab/scanpy
Commit Name: 97fd3bff1dd85094cfdd1d90264fd19ba5c41260
Time: 2020-06-16
Author: koncopd@gmail.com
File Name: scanpy/tools/_rank_genes_groups.py
Class Name: _RankGenes
Method Name: wilcoxon