Example: a handwriting recognition system
Example: using kNN on a handwriting recognition system.
- Collect: Text file provided.
- Prepare: Write a function to convert from the image format to the list format
used in our classifier, classify0(). - Analyze: We’ll look at the prepared data in the Python shell to make sure it’s
correct. - Train: Doesn’t apply to the kNN algorithm.
- 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.
- 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.