c5f9a908910ab118c465de659a8a90c9d64aa708,deepchem/trans/transformers.py,PowerTransformer,transform,#PowerTransformer#Any#,592

Before Change


    shutil.rmtree(dataset.data_dir)
    os.makedirs(dataset.data_dir)
    DiskDataset.from_numpy(X_t, y_t, w_t, ids_t, data_dir=dataset.data_dir)
    return dataset

  def untransform(self, z):
    print("Cannot undo Power Transformer, for now.")    
    

After Change


      y_t = y
    if self.transform_y:
      // print("y will not be transformed by PowerTransformer, for now.")
      y_t = np.power(y, self.powers[0])
      for i in range(1, n_powers):
      	y_t = np.hstack((y_t,np.power(y, self.powers[i])))
      X_t = X
    
    shutil.rmtree(dataset.data_dir)
    os.makedirs(dataset.data_dir)
    DiskDataset.from_numpy(dataset.data_dir, X_t, y_t, w_t, ids_t)
    return dataset
    
    return NumpyDataset(X_t, y_t, w_t, ids_t)

  def untransform(self, z):
    // print("Cannot undo Power Transformer, for now.")    
    n_powers = len(self.powers)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: deepchem/deepchem
Commit Name: c5f9a908910ab118c465de659a8a90c9d64aa708
Time: 2016-11-14
Author: flee2@stanford.edu
File Name: deepchem/trans/transformers.py
Class Name: PowerTransformer
Method Name: transform


Project Name: automl/auto-sklearn
Commit Name: 1ec4287799a1ccfc019f564f3ce0de468de6e313
Time: 2015-04-09
Author: springj@informatik.uni-freiburg.de
File Name: ParamSklearn/implementations/ProjLogit.py
Class Name: ProjLogit
Method Name: predict_proba


Project Name: theislab/scanpy
Commit Name: 781857fc4e76a3662530ff755ea4e7cf649d366b
Time: 2018-03-22
Author: f.alex.wolf@gmx.de
File Name: scanpy/neighbors/__init__.py
Class Name: Neighbors
Method Name: transitions