59ec6660464bd378b20d4ae200c7614133a9a38b,pyntcloud/samplers/points.py,FarthestPointsSampler,compute,#FarthestPointsSampler#,54
Before Change
for i, p in enumerate(remaining_points):
for j, s in enumerate(solution_set):
distances[i] = min(distances[i], self.cal_distance(p, s))
solution_set.append(remaining_points.pop(distances.index(max(distances))))
return pd.DataFrame(solution_set)
After Change
for _ in range(self.n - 1):
distance_sum = self.cal_distance(remaining_points, solution_set)
select_idx = np.argmax(distance_sum)
solution_set = np.concatenate([solution_set, remaining_points[select_idx:select_idx+1]], axis=0)
remaining_points = np.delete(remaining_points, select_idx)
return pd.DataFrame(solution_set, columns=self.points.columns)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: daavoo/pyntcloud
Commit Name: 59ec6660464bd378b20d4ae200c7614133a9a38b
Time: 2019-08-26
Author: hc.wang96@gmail.com
File Name: pyntcloud/samplers/points.py
Class Name: FarthestPointsSampler
Method Name: compute
Project Name: scikit-multiflow/scikit-multiflow
Commit Name: bbdae67983fd96719d503a84d1f190c504c7e9ac
Time: 2018-07-20
Author: jacob.montiel@gmail.com
File Name: src/skmultiflow/lazy/knn.py
Class Name: KNN
Method Name: predict
Project Name: pliablepixels/zmeventnotification
Commit Name: 27f9606ab6bb050ce169567dffebc29b4c3b4775
Time: 2019-11-14
Author: pliablepixels@gmail.com
File Name: hook/zmes_hook_helpers/face.py
Class Name: Face
Method Name: detect