2e7c0700d00da702cdccb7c19b6fe1857b5bd1b7,imblearn/under_sampling/prototype_generation/cluster_centroids.py,ClusterCentroids,_sample,#ClusterCentroids#Any#Any#,111
Before Change
else:
target_class_indices = np.flatnonzero(y == target_class)
idx_under = np.concatenate(
(idx_under, target_class_indices), axis=0)
X_resampled = np.concatenate((centroids))
if sparse.issparse(X):
After Change
else:
self.voting_ = "soft"
else:
if self.voting in VOTING_KIND:
self.voting_ = self.voting
else:
raise ValueError(""voting" needs to be one of {}. Got {}"
" instead.".format(VOTING_KIND, self.voting))
X_resampled, y_resampled = [], []
for target_class in np.unique(y):
if target_class in self.ratio_.keys():
n_samples = self.ratio_[target_class]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: 2e7c0700d00da702cdccb7c19b6fe1857b5bd1b7
Time: 2017-08-24
Author: g.lemaitre58@gmail.com
File Name: imblearn/under_sampling/prototype_generation/cluster_centroids.py
Class Name: ClusterCentroids
Method Name: _sample
Project Name: scipy/scipy
Commit Name: f3c73058f769fde0679c377cdf5b3f6754628313
Time: 2013-05-01
Author: pav@iki.fi
File Name: scipy/stats/tests/test_fit.py
Class Name:
Method Name: check_cont_fit
Project Name: kengz/SLM-Lab
Commit Name: 2051aa89ec691d1c056e3e1f1187c489597c2ead
Time: 2018-08-17
Author: kengzwl@gmail.com
File Name: slm_lab/agent/memory/replay.py
Class Name: Replay
Method Name: reset