-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
Deprecate Imputer with axis=1 #9463
Copy link
Copy link
Closed
Description
After having tried to deal with a few issues related to extending Imputer behaviour, I believe we should be removing the axis parameter from Imputer.
- It seems a strange feature to support in a machine learning context, except perhaps where the features represent something like a time series.
- It is not stateful and can be performed with a FunctionTransformer. (We could even provide a
row_imputefunction, if we felt it necessary, which would roughly be defined asdef row_impute(X, **kwargs): return Imputer(**kwargs).fit_transform(X.T).T.) - It complicates the implementation, which already has a bunch of weird edge-cases (to handle sparse data with missing indicated by 0 which is an inefficient use of a sparse data structure; and to handle non-NaN missingness indicators), unnecessarily.
- It is often nonsensical to extend further features to the
axis=1case.
Do others agree?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels