Describe the bug
Hi,
First of all, well done for the package. I have been using sklearndf for a couple of months and it is very handy!
I notice however an issue with the Transformers. In particular, I can't apply the inverse_transform
To Reproduce
For example, for StandardScalerDF, I can fit it, transform my DataFrame without issues. However, if I try to inverse the transformation, it fails.
import pandas as pd
import numpy as np
from sklearndf.transformation import StandardScalerDF
# Initialise a random DataFrame
df = pd.DataFrame(np.random.randint(1, 100, size=(10, 2)), columns=["A", "B"])
print(df)
# Instantiation and Fitting of a Standard Scaler
scaler = StandardScalerDF()
scaler.fit(df)
df = scaler.transform(df)
print(df)
# Inverse the Scaling
df = scaler.inverse_transform(df) ## ERROR --> NotFittedError: StandardScalerDF is not fitted
Did I miss anything?
Expected behavior
Expect the inverse transform to be performed.
Screenshots
First Idea where to look for
I notice the usage of reset_fit() in the method inverse_transform of TransformerWrapperDF. Is it really needed? It is this command which generates the bug as it re-initializes the attribute self._features_in to None.
By commenting it, it works.
Describe the bug Hi, First of all, well done for the package. I have been using sklearndf for a couple of months and it is very handy! I notice however an issue with the Transformers. In particular, I can't apply the inverse_transform
To Reproduce For example, for StandardScalerDF, I can fit it, transform my DataFrame without issues. However, if I try to inverse the transformation, it fails.
Did I miss anything?
Expected behavior Expect the inverse transform to be performed.
Screenshots
First Idea where to look for I notice the usage of reset_fit() in the method inverse_transform of TransformerWrapperDF. Is it really needed? It is this command which generates the bug as it re-initializes the attribute self._features_in to None. By commenting it, it works.
Desktop :
Thank you in advance for your help,