1a19396d3daea14a189c4335e5df9f4072a764cc,dirty_cat/similarity_encoder.py,SimilarityEncoder,fit,#SimilarityEncoder#,143

Before Change


        n_samples, n_features = X.shape

        if self.categories in [None, "auto"]:
            self._label_encoders_ = [LabelEncoder() for _ in range(n_features)]

        if self.categories == "most_frequent":
            self.categories_ = []

After Change


        for i in range(n_features):
            Xi = X[:, i]
            if self.categories == "auto":
                self.categories_.append(np.unique(Xi))
            elif self.categories == "most_frequent":
                self.categories_.append(self.get_most_frequent(Xi))
            else:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: dirty-cat/dirty_cat
Commit Name: 1a19396d3daea14a189c4335e5df9f4072a764cc
Time: 2018-11-08
Author: maxime.cuny@inria.fr
File Name: dirty_cat/similarity_encoder.py
Class Name: SimilarityEncoder
Method Name: fit


Project Name: tensorflow/hub
Commit Name: 20f388cfe01635a2073723c5c4ffd6dd7a87fbb2
Time: 2019-11-15
Author: cedric.renggli@gmail.com
File Name: tensorflow_hub/tools/module_search/utils.py
Class Name:
Method Name: knn_errorrate_loo


Project Name: tensorflow/hub
Commit Name: 20f388cfe01635a2073723c5c4ffd6dd7a87fbb2
Time: 2019-11-15
Author: cedric.renggli@gmail.com
File Name: tensorflow_hub/tools/module_search/utils.py
Class Name:
Method Name: knn_errorrate