-
Notifications
You must be signed in to change notification settings - Fork 11
Home for SRC
SRC, Sparse Representation-based Classification, is an algorithm in Pattern Recognition area.
Training sample vector
Test sample y be projected in the relevant linear space of its class.
Training sample set
Training sample y should be
In which the x。should be
It is not only one solution for y = Ax since it is always underdetermined.
We could determine the solution by calculate the minimum L2 norm.
(L2) In which the Ax = y.
The resolved x2 is dense in general. It is hard to be classified.
In stead, we will looking for the sparsest resolution for the following formula, in which the Ax = y. The procedure to solve is a NP problem.
(L0)
We could find the approximate solution of L1 norm instead of L0 norm.
(L1) in which the Ax = y.
L1 norm can be resolved by standard linear programming tool for polynomial. It will be more efficient if the resolution is sparse.
There is noise in the real data,
in which is a noise.
So , x。can be resolved by approximate solution of L1 norm.
, in which
Use as the eigenfunction to filter the corresponding coefficient of class i. It is a new vector in which the non-zero values are related to class i. We can classify y by the minimum residual between y and
1 Input : Training sample matrix
for k kinds of classes, test samples , Fault tolerance coefficient
2 Normalize the columns of A , to make L2 norm unit.
3 Minimize L1 :
, in which
4 Calculate the residual.
5 Output : Make choice among
There are 40 classes in ORL face lib. Choose 5 as training samples in each class. Choose the left 5 as the test samples in each class.
Firstly use the PCA as feature extraction. Project the training samples on principal vectors. Then classify the test samples by SRC classifier.
The recognition rate is 96% when the PCA=80 .
1 Config the two ORL face lib path in file orl_src.m . Default path is E:\ORL_face\orlnumtotal\
2 Run orl_src.m