original_docstring: 
          print confusion matrix for two lists of labels. A given index in both lists should correspond to the same data sample
          
docstring: print confusion matrix for two lists of labels. A given index in both lists should correspond to the same data sample
docstring_tokens: print confusion matrix for two lists of labels . A given index in both lists should correspond to the same data sample
code: def class_confusion(predicted, actual, nb_classes):
          '''
          print confusion matrix for two lists of labels. A given index in both lists should correspond to the same data sample
          '''
  
          confusion = np.zeros((nb_classes, nb_classes), dtype='int16')
  
          for true, pred in zip(actual, predicted):
              # build confusion matrix
              confusion[true, pred] += 1
          pickle.dump(confusion, open('evaluation.pkl', 'w'))
          # print confusion matrix
          print "confusion matrix"
          print "rows: actual labels.  columns: predicted labels."
          for i, row in enumerate(confusion):
              print i, ": ", row
  
          print classification_report(actual, predicted, digits=3)
code_tokens: def class_confusion ( predicted , actual , nb_classes ) : confusion = np . zeros ( ( nb_classes , nb_classes ) , dtype = 'int16' ) for true , pred in zip ( actual , predicted ) : confusion [ true , pred ] += 1 pickle . dump ( confusion , open ( 'evaluation.pkl' , 'w' ) ) print "confusion matrix" print "rows: actual labels.  columns: predicted labels." for i , row in enumerate ( confusion ) : print i , ": " , row print classification_report ( actual , predicted , digits = 3 )
short_docstring: print confusion matrix for two lists of labels.
short_docstring_tokens: print confusion matrix for two lists of labels .
comment: '''
          print confusion matrix for two lists of labels. A given index in both lists should correspond to the same data sample
          '''$SEP$# build confusion matrix$SEP$# print confusion matrix