title: Facing ValueError: Target is multiclass but average='binary'
body: <p>I'm a newbie to python as well as machine learning. As per my requirement, I'm trying to use Naive Bayes algorithm for my dataset.</p>
  <p>I'm able to find out the accuracy but trying to find out precision and recall for the same. But, it is throwing the following error:</p>
  <pre><code>ValueError: Target is multiclass but average='binary'. Please choose another average setting.
  </code></pre>
  <p>Can anyone please suggest me how to proceed with it. I have tried using average ='micro' in the precision and the recall scores.It worked without any errors but it is giving the same score for accuracy, precision, recall.</p>
  <h1>My dataset:</h1>
  <h1>train_data.csv:</h1>
  <pre><code>review,label
  Colors &amp; clarity is superb,positive
  Sadly the picture is not nearly as clear or bright as my 40 inch Samsung,negative
  </code></pre>
  <h1>test_data.csv:</h1>
  <pre><code>review,label
  The picture is clear and beautiful,positive
  Picture is not clear,negative
  </code></pre>
  <h1>My Code:</h1>
  <pre><code>from sklearn.preprocessing import MultiLabelBinarizer
  from sklearn.model_selection import train_test_split
  from sklearn.naive_bayes import BernoulliNB
  from sklearn.metrics import confusion_matrix
  from sklearn.feature_extraction.text import CountVectorizer
  from sklearn.naive_bayes import MultinomialNB
  from sklearn.metrics import precision_score
  from sklearn.metrics import recall_score
  
  
  def load_data(filename):
      reviews = list()
      labels = list()
      with open(filename) as file:
          file.readline()
          for line in file:
              line = line.strip().split(',')
              labels.append(line[1])
              reviews.append(line[0])
  
      return reviews, labels
  
  X_train, y_train = load_data('/Users/abc/Sep_10/train_data.csv')
  X_test, y_test = load_data('/Users/abc/Sep_10/test_data.csv')
  
  vec = CountVectorizer() 
  
  X_train_transformed =  vec.fit_transform(X_train) 
  
  X_test_transformed = vec.transform(X_test)
  
  clf= MultinomialNB()
  clf.fit(X_train_transformed, y_train)
  
  score = clf.score(X_test_transformed, y_test)
  print(&quot;score of Naive Bayes algo is :&quot; , score)
  
  y_pred = clf.predict(X_test_transformed)
  print(confusion_matrix(y_test,y_pred))
  
  print(&quot;Precision Score : &quot;,precision_score(y_test,y_pred,pos_label='positive'))
  print(&quot;Recall Score :&quot; , recall_score(y_test, y_pred, pos_label='positive') )
  </code></pre>