e87e84a21e0dfc1258b2f868532b03fabfd66a85,autokeras/adapters/output_adapter.py,ClassificationHeadAdapter,fit_before_convert,#ClassificationHeadAdapter#Any#,67

Before Change


        // If in tf.data.Dataset, must be encoded already.
        if isinstance(dataset, tf.data.Dataset):
            if not self.num_classes:
                shape = data_utils.dataset_shape(dataset)[0]
                // Single column with 0s and 1s.
                if shape == 1:
                    self.num_classes = 2
                else:
                    self.num_classes = shape
            return
        if isinstance(dataset, pd.DataFrame):
            dataset = dataset.values
        if isinstance(dataset, pd.Series):

After Change



        // If encoded.
        if len(dataset.flatten()) != len(dataset):
            if self.num_classes:
                self._check_data_shape(dataset.shape[1:])
            return

        // Fit encoder.
        labels = set(dataset.flatten())
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 6

Instances


Project Name: keras-team/autokeras
Commit Name: e87e84a21e0dfc1258b2f868532b03fabfd66a85
Time: 2020-06-01
Author: jhfjhfj1@gmail.com
File Name: autokeras/adapters/output_adapter.py
Class Name: ClassificationHeadAdapter
Method Name: fit_before_convert


Project Name: jhfjhfj1/autokeras
Commit Name: dd3469ee312513f2b8a1b2e4e90e8eb95a6f3bbb
Time: 2020-06-09
Author: jhfjhfj1@gmail.com
File Name: autokeras/utils/data_utils.py
Class Name:
Method Name: batch_dataset