code: def example_of_aggregating_sim_matrix(
      raw_data, labels, num_subjects, num_epochs_per_subj
  ):
      # aggregate the kernel matrix to save memory
      svm_clf = svm.SVC(
          kernel="precomputed", shrinking=False, C=1, gamma="auto"
      )
      clf = Classifier(
          svm_clf,
          num_processed_voxels=1000,
          epochs_per_subj=num_epochs_per_subj,
      )
      rearranged_data = (
          raw_data[num_epochs_per_subj:]
          + raw_data[0:num_epochs_per_subj]
      )
      rearranged_labels = (
          labels[num_epochs_per_subj:] + labels[0:num_epochs_per_subj]
      )
      clf.fit(
          list(zip(rearranged_data, rearranged_data)),
          rearranged_labels,
          num_training_samples=num_epochs_per_subj * (num_subjects - 1),
      )
      predict = clf.predict()
      print(predict)
      print(clf.decision_function())
      test_labels = labels[0:num_epochs_per_subj]
      incorrect_predict = (
          hamming(predict, np.asanyarray(test_labels))
          * num_epochs_per_subj
      )
      logger.info(
          "when aggregating the similarity matrix to save memory, "
          "the accuracy is %d / %d = %.2f"
          % (
              num_epochs_per_subj - incorrect_predict,
              num_epochs_per_subj,
              (num_epochs_per_subj - incorrect_predict)
              * 1.0
              / num_epochs_per_subj,
          )
      )
      # when the kernel matrix is computed in portion, the test data is already in
      print(clf.score(None, test_labels))
  
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 1 for calling a global function with example usage: example_of_aggregating_sim_matrix(raw_data, labels, num_subjects, num_epochs_per_subj) without return types