I am preprocessing data via Pipelines, turning categoricals to numeric, encoding etc... and it's very comfortable.
But there is instance later in the project, where I want to test out some feature importance and I need to give X and y to the model. But it does not accept pipeline, hence X and y are not preprocessed.
from yellowbrick.model_selection import FeatureImportances
model = RandomForestClassifier(n_estimators=10)
viz = FeatureImportances(model)
viz.fit(X, y)
viz.show()
Is there a way to use pipelines preprocessed data like X,y to input into models? Or should I preprocess and encode data manually for such cases? Thanks