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)