code: def example_of_cross_validation_using_model_selection(
      raw_data, labels, num_subjects, num_epochs_per_subj
  ):
      # NOTE: this method does not work for sklearn.svm.SVC with precomputed kernel
      # when the kernel matrix is computed in portions; also, this method only works
      # for self-correlation, i.e. correlation between the same data matrix.
  
      # no shrinking, set C=1
      svm_clf = svm.SVC(
          kernel="precomputed", shrinking=False, C=1, gamma="auto"
      )
      # logit_clf = LogisticRegression()
      clf = Classifier(svm_clf, epochs_per_subj=num_epochs_per_subj)
      # doing leave-one-subject-out cross validation
      # no shuffling in cv
      skf = model_selection.StratifiedKFold(
          n_splits=num_subjects, shuffle=False
      )
      scores = model_selection.cross_val_score(
          clf, list(zip(raw_data, raw_data)), y=labels, cv=skf
      )
      print(scores)
      logger.info(
          "the overall cross validation accuracy is %.2f"
          % np.mean(scores)
      )
  
file_path: brainiak/examples/fcma/classification.py
imports: from brainiak.fcma.classifier import Classifier
  from brainiak.fcma.preprocessing import prepare_fcma_data
  from brainiak import io
  from sklearn import svm
  import sys
  import logging
  import numpy
  from scipy.spatial.distance import hamming
  from sklearn import model_selection
label_desc: Use image node_id 3 for calling a global function with example usage: example_of_cross_validation_using_model_selection(raw_data, labels, num_subjects, num_epochs_per_subj) without return types