title: How to run SVC classifier after running 10-fold cross validation in sklearn?
body: <p>I'm relatively new to machine learning and would like some help in the following:</p>
  
  <p>I ran a Support Vector Machine Classifier (SVC) on my data with 10-fold cross validation and calculated the accuracy score (which was around 89%). I'm using Python and scikit-learn to perform the task. Here's a code snippet:</p>
  
  <pre><code>def get_scores(features,target,classifier):
    X_train, X_test, y_train, y_test =train_test_split(features, target , 
      test_size=0.3)
      scores = cross_val_score(
      classifier,
      X_train,
      y_train,
      cv=10,
      scoring='accuracy',
      n_jobs=-1)
   return(scores)
  
  get_scores(features_from_df,target_from_df,svm.SVC())
  </code></pre>
  
  <p>Now, how can I use my classifier (after running the 10-folds cv) to test it on X_test and compare the predicted results to y_test? As you may have noticed, I only used X_train and y_train in the cross validation process.</p>
  
  <p>I noticed that sklearn have cross_val_predict: 
  <a href="http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.cross_val_predict.html" rel="nofollow noreferrer">http://scikit-learn.org/stable/modules/generated/sklearn.model_selection.cross_val_predict.html</a> should I replace my cross_val_score by cross_val_predict? just FYI: my target data column is binarized (have values of 0s and 1s).</p>
  
  <p>If my approach is wrong, please advise me with the best way to proceed with.</p>
  
  <p>Thanks!</p>