title: How to get confusion matrix in LogisticRegressionCV?
body: <p>I implemented two versions of the logistic regression model. In the second version my goal is to find the best hyperparameter C, otherwise I am okay with the first version. I also need mean and std. dev. of confusion matrix and coefficient matrix for the best hyperparameter C. But I am confused how to get those in LogisticRegressionCV second version.</p>
  <p>Version 1</p>
  <pre class="lang-py prettyprint-override"><code>    sss = RepeatedStratifiedKFold(n_splits=K_fold, n_repeats=n_repeats ,random_state=36851234)
      lambda_c=1.0
      cmn=[]
      coef=[]
      for train_index, test_index in sss.split(X,y):
          x_train,x_test=X[train_index],X[test_index]
          y_train,y_test=y[train_index],y[test_index]
          log_reg_model = LogisticRegression(max_iter=50000,C=lambda_c,penalty='l1',multi_class='ovr',class_weight='balanced',solver='liblinear')
          pipe=Pipeline([  ('polynomial_features',polynomial),   ('StandardScaler',StandardScaler()), ('logistic_regression',log_reg_model)])
          pipe.fit(x_train, y_train)
          y_pred=pipe.predict(x_test)
          y_prob = pipe.predict_proba(x_test)
  
          LR= pipe.named_steps['logistic_regression']
          coef.append(LR.coef_)
          cmn.append(confusion_matrix(y_test,y_pred,normalize='true'))
  
      cmn_std=np.std(np.array(cmn),axis=0)
      coef_std=np.std(np.array(coef),axis=0)
      cmn=np.mean(np.array(cmn),axis=0)
      coef=np.mean(np.array(coef),axis=0)
  </code></pre>
  <p>Version 2</p>
  <pre class="lang-py prettyprint-override"><code>    sss = RepeatedStratifiedKFold(n_splits=K_fold, n_repeats=n_repeats ,random_state=36851234)
      lambda_c=list(np.power(10.0, np.arange(-10, 3)))
      scoring='precision_weighted'
      log_reg_model = LogisticRegressionCV(max_iter=50000,fit_intercept=False,cv=sss,Cs=lambda_c,penalty='l1',multi_class='ovr',scoring=scoring,class_weight='balanced',solver='liblinear')
      pipe=Pipeline([  ('polynomial_features',polynomial),   ('StandardScaler',StandardScaler()), ('logistic_regression',log_reg_model)])
      pipe.fit(X,y)
      poly = pipe.named_steps['polynomial_features']
      LR= pipe.named_steps['logistic_regression']
      LR.coef_ # the shape is [3,6]; #class = 3 and #features = 6 
      LR.coefs_paths_  # the shape is [500,13,6]; #cv = 500, #C=13, #features=6  
  </code></pre>
  <p>How to get mean and std. dev. of confusion matrix and coeff. matrix in second version of the model? This is not clear to me. I also see LR.C_=[100. 0.1   0.1] in the output for my data which has 3 classes. Why do we have different value of hyperparameter for each class. This part also I don't understand fully. Thanks.</p>