Skip to content
/ SRC Public

Sparse Representation-based Classification, a classified algorithm in Pattern Recognition area

License

Notifications You must be signed in to change notification settings

lamplampan/SRC

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SRC

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

What is SRC

SRC, Sparse Representation-based Classification, is an algorithm in Pattern Recognition area.

Sparse linear combination

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

Sparse Representation

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

SRC Algorithm

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

Test result on ORL face lib.

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

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

About

Sparse Representation-based Classification, a classified algorithm in Pattern Recognition area

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages