1. A method comprising: classifying a reference set of visual patterns that belong to a parent class into mutually exclusive child classes that include first and second child classes, a visual pattern from the reference set being classified into the first child class instead of the second child class; modifying a weight vector that corresponds to the parent class, the modified weight vector altering a first probability that the visual pattern belongs to the first child class and a second probability that the visual pattern belongs to the second child class; based on the altered first and second probabilities, removing mutual exclusivity from the first and second child classes by adding the visual pattern to the second child class; and using a processor, generating a hierarchy of classes of visual patterns, the hierarchy including the parent class and the mutually nonexclusive first and second child classes that each include the visual pattern.