Description
Since ColumnTransformer is primarily used to apply basic preprocessing, it would be extremely helpful if it (and FeatureUnion
while we're at it) supported inverse_transform
(where each of its constituent estimators does too). This also would replace some functionality we might otherwise support with categorical_features
or ignored_features
etc parameters (H/T @qinhanmin2014).
In order for it to support inverse_transform
, it would need to have an index of which columns in the output came from which transformers, which is what I intended to solve in #1952. This is not hard as long as fit_transform
, rather than fit
, is called, or as long as all the constituent transformers support get_feature_names
. Maybe we could force a run of transform
when fit is called in order to check the output size.
(Alternatively, it might be nice to have a consistent API for a transformer to declare its output size, which n_components_
does for a handful of estimators.)