9951 explained code solutions for 126 technologies


python-scikit-learnHow to inverse transformed data with PowerTransformer


from sklearn import preprocessing

pt = preprocessing.PowerTransformer()
data = [[1, 2], [3, 2], [4, 5]]
pt.fit(data)

transformed = pt.transform(data)
original = pt.inverse_transform(transformed)ctrl + c
from sklearn import

import module from scikit-learn

.PowerTransformer(

create power transformation model

.fit(

train transformation model

.transform(

transform original data and return transformed data

transformed

transformed data

.inverse_transform(

inverse transformed data to original state

original

will contain inversed transformed data (basically = original data)