aeon icon indicating copy to clipboard operation
aeon copied to clipboard

[ENH] BaseSeriesTransformers passed pd.Series or pd.DataFrame

Open TonyBagnall opened this issue 10 months ago • 0 comments

see #1372 #1375

Describe the feature or idea you want to propose

when a class that extends BaseSeriesTransformer is passed a pd.Series or pd.DataFrame, we currently leave it up to the transformer what to return

If the user passes a pd.Series or pd.DataFrame, should we also return a pd.Series or pd.DataFrame?

currently everything is converted to the X_inner_type of the transformer, and the transformer returns whatever it wants. Most current core devs rarely work with pandas, but of course forecasting types work almost exclusively with them. The associated issue is should we check and constrain the possible output types?

Describe your proposed solution

Option 1: store input type in base class, convert back after transform or inverse transform Option 2: allow transformer to decide what to return, but restrict to one of the three supported types through test_all_series_estimators Option 3: (current state) allow transformer to decide what to return and do no checking (beyond axis)

feel free to add other options

Describe alternatives you've considered, if relevant

No response

Additional context

No response

TonyBagnall avatar Apr 07 '24 10:04 TonyBagnall