I've built a pipeline in Scikit-Learn with two steps: one to construct features, and the second is a RandomForestClassifier.
While I can save that pipeline, look at various steps and the various parameters set in the steps, I'd like to be able to examine the feature importances from the resulting model.
Is that possible?
Ah, yes it is.
You list identify the step where you want to check the estimator:
For instance:
Which returns:
You can then access the model step directly:
pipeline.steps[1][1].feature_importances_