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)

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:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

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: iskandr/fancyimpute
Commit Name: 9439f5215fde61ee40910b0320ff4dd8d28571e2
Time: 2016-01-10
Author: alex.rubinsteyn@gmail.com
File Name: fancyimpute/bayesian_ridge_regression.py
Class Name: BayesianRidgeRegression
Method Name: predict_dist


Project Name: iskandr/fancyimpute
Commit Name: 4341a7775df1d34798dafa9cc7c8b480ccce21d6
Time: 2016-01-10
Author: alex.rubinsteyn@gmail.com
File Name: fancyimpute/bayesian_ridge_regression.py
Class Name: BayesianRidgeRegression
Method Name: fit