title: Simple example using BernoulliNB (naive bayes classifier) scikit-learn in python - cannot explain classification
body: <p>Using scikit-learn 0.10</p>
  
  <p>Why does the following trivial code snippet:</p>
  
  <pre><code>from sklearn.naive_bayes import *
  
  import sklearn
  from sklearn.naive_bayes import *
  
  print sklearn.__version__
  
  X = np.array([ [1, 1, 1, 1, 1], 
                 [0, 0, 0, 0, 0] ])
  print "X: ", X
  Y = np.array([ 1, 2 ])
  print "Y: ", Y
  
  clf = BernoulliNB()
  clf.fit(X, Y)
  print "Prediction:", clf.predict( [0, 0, 0, 0, 0] )    
  </code></pre>
  
  <p>Print out an answer of "1" ?  Having trained the model on [0,0,0,0,0] => 2 I was expecting "2" as the answer.</p>
  
  <p>And why does replacing Y with</p>
  
  <pre><code>Y = np.array([ 3, 2 ])
  </code></pre>
  
  <p>Give a different class "2" as an answer (the correct one) ?  Isn't this just a class label?</p>
  
  <p>Can someone shed some light on this?</p>