1. A recognition system, comprising a memory having stored therein computer executable components and a processor that executes the following computer executable components: a density model identifier component that identifies a plurality of density models for each of at least two classes that are employed in connection with recognition; and an optimization component that at least: identifies a subset of the density models for employment in a recognition application; selects a model of the subset of the density models for each class to achieve an optimization based on, at least in part, multi-class classification accuracy; and determines the optimization based on, at least in part: forming an error graph that captures confusability between the at least two classes; triangulating the error graph to form a junction tree that includes cliques; and associating each clique of the junction tree with a potential, wherein the potential is based on a value for each of the possible configurations of variables in the clique.