-1

I have created a pipeline object which uses countvectorizer and MultinomialNB. MultinomialNB instances have an attributes named intercept_. If I try to access this attribute using the Pipeline object I am getting the error that 'Pipeline' object has no attribute 'intercept_'. I am wondering if there is a way to access attributes of the final estimator class in a Pipeline instance. I would like to thank in advance.

Abhishek Mishra
  • 1,938
  • 1
  • 16
  • 13

1 Answers1

0

Yes, using either the steps or named_steps attributes, see this question: Getting model attributes from scikit-learn pipeline

Community
  • 1
  • 1
Andreas Mueller
  • 25,355
  • 7
  • 57
  • 68