04573605a3bef45d29d81302bce154f220bbd7f5,finetune/target_encoders.py,OrdinalRegressionEncoder,rank_to_thresholds,#OrdinalRegressionEncoder#Any#,125
Before Change
//print("RANK: {}".format(x[0]))
for i in range(len(x)):
rank = int(x[i])
thresholds.append(np.concatenate((np.ones(rank,),np.zeros((num_thresholds-rank),))))
return thresholds
def inverse_transform(self, y):
After Change
x = x[:10000]
num_thresholds = len(self.categories_[0])-1
thresholds = [np.concatenate((np.ones(int(rank)),np.zeros((num_thresholds-int(rank))))) for rank in x]
return np.array(thresholds)
def inverse_transform(self, y):
//this commented part doesn"t work yet
//y = np.asarray(y)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: IndicoDataSolutions/finetune
Commit Name: 04573605a3bef45d29d81302bce154f220bbd7f5
Time: 2019-01-15
Author: matthew.bayer@indico.io
File Name: finetune/target_encoders.py
Class Name: OrdinalRegressionEncoder
Method Name: rank_to_thresholds
Project Name: librosa/librosa
Commit Name: 538f969f17ef232c75588dfa2a3157bd97aae45d
Time: 2013-02-11
Author: brm2132@columbia.edu
File Name: librosa/beat.py
Class Name:
Method Name: _beat_tracker
Project Name: scikit-learn-contrib/imbalanced-learn
Commit Name: cddf39be59c3c1231d2d4fd3b9bfc10a21e63780
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