Giter VIP home page Giter VIP logo

src's Introduction

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

src's People

Contributors

lamplampan avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.