A Pattern-Hierarchy Classifier for Reduced Teaching