title: How sklearn.pipeline works, in manually?
body: <p>Currently, I am working on the sklearn.pipeline which is just wonderful Here is an example: </p>
  
  <pre><code>model = make_pipeline(TfidfVectorizer(), MultinomialNB())
  model.fit(train.data, train.target)
  labels = model.predict(test.data)
  </code></pre>
  
  <p>(*data is from <code>train = fetch_20newsgroups(subset='train', categories=categories</code>))
  with <code>categories= ['talk.religion.misc', 'soc.religion.christian', 'sci.space','comp.graphics']</code></p>
  
  <p>However, my understanding is just still very vague. I would like to ask that if we do it step by step without pipeline how it could be. Here is just what I am trying to do but it failed.</p>
  
  <pre><code>from sklearn.datasets import fetch_20newsgroups
  Categories = ['talk.religion.misc', 'soc.religion.christian', 'sci.space','comp.graphics']
  train = fetch_20newsgroups(subset='train', categories=categories)`
  
  from sklearn.feature_extraction.text import TfidfVectorizer
  model1=TfidfVectorizer()
  X=model1.fit_transform(train.data)
  
  from sklearn.naive_bayes import MultinomialNB
  model2=MultinomialNB
  model2.fit(....)
  </code></pre>
  
  <p>At this far, I just don't know what to do next because the shape of <code>X</code>is not suitable for <code>model2</code>.</p>
  
  <p>For your further information of this, go to the book from <a href="https://tanthiamhuat.files.wordpress.com/2018/04/pythondatasciencehandbook.pdf" rel="nofollow noreferrer">this</a> link 
  at page (406/548)</p>
  
  <p>*** <em>Please pardon for my silly question. I know I can do it by using pipeline but just want to try</em></p>