[ENH] `make_reduction` reducers should allow parsing the values as pandas dataframe to its estimator.
#8,755 opened on 2025年8月26日
Repository metrics
- Stars
- (7,162 stars)
- PR merge metrics
- (平均マージ 26d 10h) (30d で 86 merged PRs)
説明
Is your feature request related to a problem? Please describe. Allow to parse the values to the estimator as pandas dataframe. Some attributes on sklearn estimators are only set if the input is pandas dataframe and are not set during fit with the current approach of using numpy array.
For example the attribute "feature_names_in_". E.g. useful to link features to potential feature importance generated during fit as in the example below.
from sktime.forecasting.compose import make_reduction
from sktime.datasets import load_airline
from sklearn.ensemble import RandomForestRegressor
y = load_airline()
regressor = RandomForestRegressor()
forecaster = make_reduction(regressor, window_length=15, strategy="recursive")
forecaster.fit(y)
forecaster.estimator_.feature_names_in_ #Not working now.
Describe the solution you'd like Allow to set input type similar to TabularToSeriesAdaptor.
Additional context
I imagine this could be of value for the other estimator classes that can be created via the make_reduction function.