4c38f4d32829de2abb368bedbef346f888a28c2c,nonconformist/cp.py,TcpClassifier,predict,#TcpClassifier#Any#Any#,107
Before Change
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:
return p > significance
else:
return p
After Change
train_y = np.hstack([self.train_y, y])
self.base_icp.fit(train_x, train_y)
scores = self.base_icp.nc_function.score(train_x, train_y)
n_gt = (scores[:-1] > scores[-1]).sum()
n_eq = (scores[:-1] == scores[-1]).sum()
p[i, j] = calc_p(n_train, n_eq, n_gt, self.smoothing)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: donlnz/nonconformist
Commit Name: 4c38f4d32829de2abb368bedbef346f888a28c2c
Time: 2018-01-29
Author: henrik.linusson@gmail.com
File Name: nonconformist/cp.py
Class Name: TcpClassifier
Method Name: predict
Project Name: rlworkgroup/garage
Commit Name: 8a5ee1a91d7a25fe57c3cd805bb659246b3efdd4
Time: 2018-05-31
Author: hjzh578@gmail.com
File Name: contrib/ros/envs/sawyer/pick_and_place_env.py
Class Name: PickAndPlaceEnv
Method Name: sample_goal
Project Name: rlworkgroup/garage
Commit Name: 8a5ee1a91d7a25fe57c3cd805bb659246b3efdd4
Time: 2018-05-31
Author: hjzh578@gmail.com
File Name: contrib/ros/envs/sawyer/push_env.py
Class Name: PushEnv
Method Name: sample_goal