7.1.2. mclearn.classifier.print_classification_result

mclearn.classifier.print_classification_result(X_train, X_test, y_train, y_test, report=True, recall_maps=True, classifier=None, correct_baseline=None, coords_test=None, output='', fig_dir='', trained=False)[source]

Train the specified classifier and print out the results.

Parameters:
  • X_train (array) – The feature vectors (stored as columns) in the training set.
  • X_test (array) – The feature vectors (stored as columns) in the test set.
  • y_train (array) – The target vector in the training set.
  • y_test (array) – The target vector in the test set.
  • report (bool) – Whether to print out the classification report.
  • recall_maps (bool) – Wheter to make a map of recall scores.
  • classifier (Classifier object) – A classifier object that will be used to train and test the data. It should have the same interface as scikit-learn classifiers.
  • correct_baseline (array) – If we want to compare our results to some baseline, supply the default predicted data here.
  • coords_test (array) – The coordinates of the test examples used in mapping.
  • output (str) – The name that will be attached to the path of the saved plots.
Returns:

  • correct_boolean (array) – The boolean array indicating which test exmaples were correctly predicted.
  • confusion_test (array) – The confusion matrix on the test examples.