code: def classification_rate(features):
      """Returns the classification rate of the default KNN."""
      labels = _knn.predict(trainset[N_TRAIN:], features)
      return sum(
          x == y for x, y in zip(labels, trainlabels[N_TRAIN:])
      ) / float(len(trainlabels[N_TRAIN:]))
  
file_path: deap/examples/ga/knn.py
imports: import numpy
  import csv
  import operator
  import random
label_desc: Use image node_id 1 for calling a global function with example usage: classification_rate(features) and returns: unknown