8f49b9dc1d67c01b005ebd8ead16d709916613da,dask_ml/preprocessing/label.py,LabelEncoder,fit_transform,#LabelEncoder#Any#,35

Before Change


        return self

    def fit_transform(self, y):
        return self.fit(y).transform(y)

    def transform(self, y):
        check_is_fitted(self, "classes_")
        y = self._check_array(y)

After Change


    def fit_transform(self, y):
        y = self._check_array(y)

        if isinstance(y, da.Array):
            self.classes_, y = _encode_dask_array(y, encode=True)
            self.dtype_ = None
        elif _is_categorical(y):
            self.classes_, y = _encode_categorical(y, encode=True)
            self.dtype_ = y.dtype
        else:
            return super(LabelEncoder, self).fit_transform(y)

        return y

    def transform(self, y):
        check_is_fitted(self, "classes_")
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: dask/dask-ml
Commit Name: 8f49b9dc1d67c01b005ebd8ead16d709916613da
Time: 2018-07-20
Author: TomAugspurger@users.noreply.github.com
File Name: dask_ml/preprocessing/label.py
Class Name: LabelEncoder
Method Name: fit_transform


Project Name: dmbee/seglearn
Commit Name: 1d1b36f28b5c8fc06eacec6e7a4342987e7da03b
Time: 2018-07-27
Author: david.mo.burns@gmail.com
File Name: seglearn/pipe.py
Class Name: SegPipe
Method Name: transform


Project Name: biolab/orange3
Commit Name: ee27c11166d39aafb9bf6196a037346c73ed2ae6
Time: 2015-02-20
Author: janez.demsar@fri.uni-lj.si
File Name: Orange/preprocess/transformation.py
Class Name: Transformation
Method Name: __call__