title: Using cross validation and AUC-ROC for a logistic regression model in sklearn
body: <p>I'm using the <code>sklearn</code> package to build a logistic regression model and then evaluate it. Specifically, I want to do so using cross validation, but can't figure out the right way to do so with the <code>cross_val_score</code> function. </p>
  
  <p>According to the <a href="http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.cross_val_score.html" rel="noreferrer">documentation</a> and some <a href="https://stackoverflow.com/questions/39163354/evaluating-logistic-regression-with-cross-validation">examples</a> I saw, I need to pass the function the model, the features, the outcome, and a scoring method. However, the AUC doesn't need predictions, it needs probabilities, so it can try different threshold values and calculate the ROC curve based on that. So what's the right approach here? This function has <code>'roc_auc'</code> as a possible scoring method, so I'm assuming it's compatible with it, I'm just not sure about the right way to use it. Sample code snippet below. </p>
  
  <pre><code>from sklearn.linear_model import LogisticRegression
  from sklearn.cross_validation import cross_val_score
  
  features = ['a', 'b', 'c']
  outcome = ['d']
  X = df[features]
  y = df[outcome]
  crossval_scores = cross_val_score(LogisticRegression(), X, y, scoring='roc_auc', cv=10)
  </code></pre>
  
  <p>Basically, I don't understand why I need to pass <code>y</code> to my <code>cross_val_score</code> function here, instead of probabilities calculated using <code>X</code> in a logistic regression model. Does it just do that part on its own?</p>