Sparse Representation-based Classification, a classifier algorithm in Pattern Recognition area
+++
Author : Denglong Pan [email protected]
+++
What is SRC ?
Refer to https://github.com/lamplampan/SRC/wiki/Home-for-SRC#what-is-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.
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.
We could find the approximate solution of L1 norm instead of L0 norm.
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,
So , x。can be resolved by approximate solution of L1 norm.
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 :
4 Calculate the residual.
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 .
+++
How to run the algorithm?
Refer to https://github.com/lamplampan/SRC/wiki/Home-for-SRC#how-to-run
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