8339aa8d520cd14e4e278e7ac68a6755a8953fbd,TraditionalML/OneLayer.py,OneLayerModel,_augment_data,#OneLayerModel#Any#Any#,33

Before Change


        """

        // Randomly permute the inputs, and label the permutations Unknown
        X_permed = [
                    np.random.permutation(X[i])
                    for i in range(X.shape[0])
                   ]
        np.random.shuffle(X_permed)
        y_permed = [self.labels.index("Unknown")]*len(X_permed)
        X_permed, y_permed = np.stack(X_permed), np.stack(y_permed)
        X_aug = np.concatenate((X, X_permed), axis=0)

After Change


        """

        // Randomly permute the inputs, and label the permutations Unknown
        X_permed = np.copy(X)
        for i in range(X_permed.shape[1]):
            np.random.shuffle(X_permed[:,i])

        y_permed = [self.labels.index("Unknown")]*X_permed.shape[0]
        y_permed = np.stack(y_permed)

        X_aug = np.concatenate((X, X_permed), axis=0)
        y_aug = np.concatenate((y, y_permed), axis=0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: CyberReboot/NetworkML
Commit Name: 8339aa8d520cd14e4e278e7ac68a6755a8953fbd
Time: 2017-07-27
Author: CStephenson970@gmail.com
File Name: TraditionalML/OneLayer.py
Class Name: OneLayerModel
Method Name: _augment_data


Project Name: deepchem/deepchem
Commit Name: 630aca5c7d9629c3714b244638dba81370a2ae89
Time: 2020-08-19
Author: peastman@stanford.edu
File Name: deepchem/data/pytorch_datasets.py
Class Name: _TorchImageDataset
Method Name: __iter__


Project Name: deepchem/deepchem
Commit Name: 630aca5c7d9629c3714b244638dba81370a2ae89
Time: 2020-08-19
Author: peastman@stanford.edu
File Name: deepchem/data/pytorch_datasets.py
Class Name: _TorchNumpyDataset
Method Name: __iter__