title: Hashingvectorizer and Multinomial naive bayes are not working together
body: <p>I am trying to write a twitter sentiment analysis program with <code>Scikit-learn</code> in python 2.7. OS is Linux Ubuntu 14.04. </p>
  
  <p>In Vectorizing step, I want to use <code>Hashingvectorizer()</code>. To test the classifier accuracy it works fine with <code>LinearSVC</code>, <code>NuSVC</code>, <code>GaussianNB</code>, <code>BernoulliNB</code> and <code>LogisticRegression</code> classifiers, but for <code>MultinomialNB</code>, it returns this error</p>
  
  <pre><code>Traceback (most recent call last):
    File "/media/test.py", line 310, in &lt;module&gt;
      classifier_rbf.fit(train_vectors, y_trainTweets)
    File "/home/.local/lib/python2.7/site-packages/sklearn/naive_bayes.py", line 552, in fit
      self._count(X, Y)
    File "/home/.local/lib/python2.7/site-packages/sklearn/naive_bayes.py", line 655, in _count
      raise ValueError("Input X must be non-negative")
  ValueError: Input X must be non-negative
  [Finished in 16.4s with exit code 1] 
  </code></pre>
  
  <p>Here is the block code related to this error</p>
  
  <pre><code>vectorizer = HashingVectorizer()
  train_vectors = vectorizer.fit_transform(x_trainTweets)
  test_vectors = vectorizer.transform(x_testTweets)
  
  classifier_rbf = MultinomialNB()
  classifier_rbf.fit(train_vectors, y_trainTweets)
  prediction_rbf = classifier_rbf.predict(test_vectors)
  </code></pre>
  
  <p>Why it is happening and how can I solve it? </p>