I'm wondering how I can extract feature importances from a Random Forest in scikit-learn with the feature names when using the classifier in a pipeline with preprocessing.
The question here deals with extracting only feature importance: How to extract feature importances from an Sklearn pipeline
From the brief research I've done, this doesn't seem to be possible in scikit-learn, but I hope I'm wrong.
I also found a package called ELI5 (https://eli5.readthedocs.io/en/latest/overview.html) that is supposed to fix that issue with scikit-learn, but it didn't solve my problem because the names of the features that were outputted for me were x1, x2, etc., not the actual feature names.
As a workaround, I did all my preprocessing outside the pipeline, but would love to know how to do it in the pipeline.
If I can provide any helpful code, let me know in the comments.