tpot icon indicating copy to clipboard operation
tpot copied to clipboard

Question about Feature importance

Open Legendsevl opened this issue 4 years ago • 2 comments

Tpot is an excellent project for beginners to get started quickly. However, I encountered some problems when I explored the features importance_ in classification tasks after I output the pipline. For example: BernoulliNB' object has no attribute 'feature_importances_ SGDClassifier' object has no attribute 'feature_importances_ I would like to ask, how to solve this problem? Which classifiers are not supported by Tpot in feature extraction? Looking forward to your reply!

Legendsevl avatar Dec 13 '20 04:12 Legendsevl

Regarding a more universal way for getting features importance from pipelines, you may try to estimate permutation importance with tpot_obj.fitted_pipeline_.

weixuanfu avatar Dec 14 '20 14:12 weixuanfu

Sorry I just removed an incorrect comment on this issue.

weixuanfu avatar Dec 14 '20 15:12 weixuanfu