ad8f38c5c2687793d88c990a54bf9f3c9aeecf42,nonconformist/cp.py,TcpClassifier,predict,#TcpClassifier#,107

Before Change


				train_y = np.hstack([self.train_y, y])
				self.base_icp.fit(train_x, train_y)
				self.base_icp.calibrate(train_x, train_y)
				p[i, j] = self.base_icp.predict(np.array([x[i, :]]))[0, j]
				p[i, j] *= (n_train + 2)
				if self.smoothing:
					p[i, j] -= np.random.uniform(0, 1)
				else:

After Change


				self.base_icp.fit(train_x, train_y)
				scores = self.base_icp.nc_function.score(train_x, train_y)
				n_gt = sum(scores > scores[-1])
				n_eq = sum(scores == scores[-1])
				if self.smoothing:
					r = np.random.uniform(0, 1)
					p[i, j] = (n_gt + r*n_eq) / (n_train + 1)
				else:
					p[i, j] = (n_gt + n_eq) / (n_train + 1)

		if significance is not None:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: donlnz/nonconformist
Commit Name: ad8f38c5c2687793d88c990a54bf9f3c9aeecf42
Time: 2018-01-19
Author: giovanni.cherubin@gmail.com
File Name: nonconformist/cp.py
Class Name: TcpClassifier
Method Name: predict


Project Name: astroML/astroML
Commit Name: 4e70cb5fc9a9494e866ccd7d2e1a9046091b6337
Time: 2018-11-16
Author: bsipocz@gmail.com
File Name: astroML/density_estimation/gauss_mixture.py
Class Name: GaussianMixture1D
Method Name: __init__


Project Name: luispedro/mahotas
Commit Name: bf50aed084ac14e44a5e7b146e263b3e0e8516cc
Time: 2010-11-11
Author: lpc@cmu.edu
File Name: mahotas/tas.py
Class Name:
Method Name: