Classifying data note/practice

Example: a handwriting recognition system

Example: using kNN on a handwriting recognition system.

  1. Collect: Text file provided.
  2. Prepare: Write a function to convert from the image format to the list format
    used in our classifier, classify0().
  3. Analyze: We’ll look at the prepared data in the Python shell to make sure it’s
    correct.
  4. Train: Doesn’t apply to the kNN algorithm.
  5. Test: Write a function to use some portion of the data as test examples. The test examples are classified against the non-test examples. If the predicted class doesn’t match the real class, you’ll count that as an error.
  6. Use: Not performed in this example. You could build a complete program to extract digits from an image, such a system used to sort the mail in the United States.