title: Scikit: calculate precision and recall using cross_val_score function
body: <p>I'm using scikit to perform a logistic regression on spam/ham data. 
  X_train is my training data and y_train the labels('spam' or 'ham') and I trained my LogisticRegression this way:</p>
  
  <pre><code>classifier = LogisticRegression()
  classifier.fit(X_train, y_train)
  </code></pre>
  
  <p>If I want to get the accuracies for a 10 fold cross validation, I just write:</p>
  
  <pre><code> accuracy = cross_val_score(classifier, X_train, y_train, cv=10)
  </code></pre>
  
  <p>I thought it was possible to calculate also the precisions and recalls by simply adding one parameter this way:</p>
  
  <pre><code>precision = cross_val_score(classifier, X_train, y_train, cv=10, scoring='precision')
  recall = cross_val_score(classifier, X_train, y_train, cv=10, scoring='recall')
  </code></pre>
  
  <p>But it results in a <code>ValueError</code>:</p>
  
  <pre><code>ValueError: pos_label=1 is not a valid label: array(['ham', 'spam'], dtype='|S4') 
  </code></pre>
  
  <p>Is it related to the data (should I binarize the labels ?) or do they change the <code>cross_val_score</code> function ?</p>
  
  <p>Thank you in advance !</p>