[ENH] improvements to _ColumnEstimator
- refactor to reduce coupling with BaseForecaster
#4791
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This improves the
_HeterogenousMetaEstimator
and_ColumnEstimator
:_HeterogenousMetaEstimator
now allows tuples of any length in the_steps_attr
, as long as the zeroth elements are str names, and the first elements are estimators_ColumnEstimator._coerce_to_pd_index
has been refactored so that aref
reference index is passed instead of assumingself._y
is present (which is the case only in forecasters)The change to
_HeterogenousMetaEstimator
is indirectly tested in #4789 and will be tested inscikit-base
.The change to
_ColumnEstimator._coerce_to_pd_index
is covered by existing tests as it is a re-factor that makes it more flexible (allowing #4789).Depends on #4789 (and therefore indirectly on #4793)