1. A face recognition method on a computing device, comprising: storing a plurality of training face images, each training face image corresponding to a face class, each face class including one or more training face images; obtaining one or more face test samples; applying a representation model to represent the face test sample as a combination of the training face images and error terms, wherein a coefficient vector is corresponded to the training face images; estimating the coefficient vector and the error terms by solving a constrained optimization problem, including: presenting a general framework by using a multi-model representation of error terms to formulate the constrained optimization problem, choosing one or more application-specific potential loss functions for characterizing the error terms, choosing a method for regularization, and solving the constrained optimization problem, wherein each application-specific potential loss function is a summation of dual potential functions; computing a residual error for each face class, the residual error for a face class being an error between the face test sample and the face test sample's representation model represented by the training samples in the face class; classifying the face test sample by selecting the face class that yields the minimal residual error; and presenting the face class of the face test sample; wherein: provided that that yε d denotes a face test sample and T=[T i ,. .. , T c ]ε d×n denotes a face dictionary, a face dictionary being a matrix with a set of training samples of c subjects stacked in columns, T i ε d×n i denotes the n i set of samples of the i th subject, such that Σ i n i =n, a denotes the coefficient vector, J(a) denotes a function of the coefficient vector a, the general framework to formulate the constrained optimization problem is defined to estimate the coefficient vector a that minimizes: 
 J ( a )=Φ k ( y−Ta )+λ θ θ( a ) wherein function Φ k (x) represents an application-specific potential loss function, and function θ(•) defines the method of regularization.