Add target name to pipeline's `input_feature_names`
- Dominant language
- Python
- Stars
- 850
- Forks
- 96
- PR merge metrics
- No merged PRs in 30d
Description
Note: migrated from #1493 which tracks simply adding target names to the output of predict; this issue tracks a suggestion also made in the thread.
Based on the discussion raised by @gsheni and @kmax12 in Slack we should update the `.input_feature_names` value held our pipelines to hold both the feature column names, as well as the target name.
Currently, `.input_feature_names` returns a dictionary, where the keys are the components and the corresponding values are the feature names that the component gets. We could update this to be a tuple, where the first element of the tuple is the current list of feature names, and the second element of the tuple is the name of the target.
That is, currently we have something like:
```python
{"OHE": ["col1", "col2", "col3"], "Imputer: ["col1_1", "col1_2", "col2", "col3"]}
```
We could update this to:
```python
{"OHE": (["col1", "col2", "col3"], "target"), "Imputer: (["col1_1", "col1_2", "col2", "col3"], "target")}
```
I don't see the target name changing, so maybe this is a bit silly, but it also keeps the nice structure we have now where we keep track of what every component sees.
Contributor guide
Assessment
This issue has not been assessed yet.