Last answered:

08 Mar 2022

Posted on:

07 Mar 2022

0

How to fix : " AttributeError: 'CountVectorizer' object has no attribute 'get_feature_names_out'"

image.png

2 answers ( 0 marked as helpful)
Instructor
Posted on:

08 Mar 2022

2

Hey Mohamed,

Thank you for engaging with the Machine Learning with Naïve Bayes course!

Please, make sure that the version of sklearn you are using is 1.0 or greater. The method get_feature_names_out() substitutes the already deprecated and removed get_feature_names() one.

Please, let me know if the error persists.

Kind regards,
365 Hristina

Posted on:

08 Mar 2022

0

Hey Hristina,
   Thank you very much it is now working well.
Br,
Mohamed.

Submit an answer