title: Does sklearn LogisticRegressionCV use all data for final model
body: <p>I was wondering how the final model (i.e. decision boundary)  of LogisticRegressionCV in sklearn was calculated. So say I have some Xdata and ylabels such that</p>
  
  <pre><code>Xdata # shape of this is (n_samples,n_features)
  ylabels # shape of this is (n_samples,), and it is binary
  </code></pre>
  
  <p>and now I run</p>
  
  <pre><code>from sklearn.linear_model import LogisticRegressionCV
  clf = LogisticRegressionCV(Cs=[1.0],cv=5)
  clf.fit(Xdata,ylabels)
  </code></pre>
  
  <p>This is looking at just one regularization parameter and 5 folds in the CV. So <code>clf.scores_</code> will be a dictionary with one key with a value that is an array with shape (n_folds,1). With these five folds you can get a better idea of how the model performs.</p>
  
  <p>However, I'm confused about what you get from <code>clf.coef_</code> (and I'm assuming the parameters in <code>clf.coef_</code> are the ones used in <code>clf.predict</code>). I have a few options I think it could be:</p>
  
  <ol>
  <li>The parameters in <code>clf.coef_</code> are from training the model on all the data</li>
  <li>The parameters in <code>clf.coef_</code> are from the best scoring fold</li>
  <li>The parameters in <code>clf.coef_</code> are averaged across the folds in some way.</li>
  </ol>
  
  <p>I imagine this is a duplicate question, but for the life of me I can't find a straightforward answer online, in the sklearn documentation, or in the source code for LogisticRegressionCV. Some relevant posts I found are:</p>
  
  <ol>
  <li><a href="https://stackoverflow.com/questions/49455806/gridsearchcv-final-model">GridSearchCV final model</a></li>
  <li><a href="https://stackoverflow.com/questions/49562046/scikit-learn-logisticregressioncv-best-coefficients">scikit-learn LogisticRegressionCV: best coefficients</a></li>
  <li><a href="https://stackoverflow.com/questions/44036193/using-cross-validation-and-auc-roc-for-a-logistic-regression-model-in-sklearn?noredirect=1&amp;lq=1">Using cross validation and AUC-ROC for a logistic regression model in sklearn</a></li>
  <li><a href="https://stackoverflow.com/questions/39163354/evaluating-logistic-regression-with-cross-validation">Evaluating Logistic regression with cross validation</a></li>
  </ol>