Closed admivsn closed 1 year ago
How annoying!
Thank you for reporting @admivsn
I need to look into the inner workings of the pipeline.
By the looks of the error, the pipe is surprised to get the extra feature created by the RelativeFeatures.
I'll see if I can dig some time over the weekend.
Cheers
The root cause of this issue is that at this line here:
class RelativeFeatures(BaseCreation):
...
def transform(self, X: pd.DataFrame) -> pd.DataFrame:
X = super().transform(X)
The transform method of BaseCreation
is called. This method will then call the get_features_out
method defined in GetFeatureNamesOutMixin
which will return the feature names out of the child class RelativeFeatures
instead of the parent class BaseCreation
and since BaseCreation.transform(self, X) returns a DataFrame with 2 columns and get_features_out
returns 3 columns this mismatch causes the error described in the issue.
Yes, I just figured that out. I am fixing as we speak. PR coming in the next minutes. Thank you!
That was a nasty one!
Describe the bug Pipelines break when you use pandas transform output with feature creation.
To Reproduce Steps to reproduce the behavior: