Please solving this QP equation

3 views (last 30 days)
Hassan
Hassan on 16 Aug 2015
Commented: Hassan on 6 Sep 2015
i work on a problem that is so like a SVDD (support vector data description) a new work on SVDD is QSVDD(Quasi support vector data description) that describes more accurately lots of real data sets than SVDD.the pdf of this article is here: www.sersc.org/journals/IJSIP/vol5_no3/5.pdf
The objective of SVDD is to find a sphere or domain with minimum volume containing all or most of the data. let {Xi|i=1,2,...,n} whit d dimention be the given training data set. Let a and R denote the center and radius of the sphere, respectively.This goal is formulated as a constrained convex optimization problem :
where eta is a slack variable that allows the possibility of outliers in the training data set. The parameter C controls the trade-off between the volume and the training errors.
the method of the QSVDD is like a SVDD but the gravity center of the samples has a decisive role.they changed the mathematical model of SVDD as purposful. the goal is to give importance to gravity center of samples and incorporate this idea with SVDD method.Distance between center of sphere and samples gravity center is formulated as:
and proposed idea is formulated as a constrained optimization problem:
the parameter,B,implies the importance degree of gravity center and the parameter, C, has the same role that it has in SVDD method. Constructing the Lagrangian function with Lagrange multipliers gives:
Setting partial derivatives of R, a and ete to zero gives the constraints we can calculate the center of the sphare (a) from this formula:
substituting this constraints in constrained optimization problem give us the dual problem :
This optimization problem is equivalent to a convex quadratic problem with global minimum, when B>-1 holds. solving this problem gives a set αi.
my question is : how can i solve this convex quadratic problem with a quadprog() function in matlab ??????
A training object xi and its corresponding αi satisfy one of this three conditions :
The objects with the coefficients αi>0 are called the support vectors. The radius R of the sphere can be obtained by calculating the distance from the center of the sphere to any support vector with 0<αi<C.
i want to use the idea of QSVDD in my work but i cant solve that QP. please help me and tanks.

Accepted Answer

Matt J
Matt J on 16 Aug 2015
Edited: Matt J on 17 Aug 2015
Let X be the matrix whose columns are the x_i. Then, it will be something like the following,
Q=X.'*X;
H=2*Q;
f=-2*B/n*sum(Q,2)+trace(Q)*(1+B);
H=-H; f=-f; %convert maximization to minimization
Aeq=ones(1,n);
beq=1;
lb(1:n)=0;
ub(1:n)=C;
alpha=quadprog(H,f,[],[],Aeq,beq,lb,ub);
  10 Comments
Matt J
Matt J on 6 Sep 2015
These are MATLAB commands and you can find out about them from the doc() command. sum(Q,2) is the summation along the rows of the matrix Q. trace(Q) is the trace of the matrix Q (sum along the diagonal).
Hassan
Hassan on 6 Sep 2015
thank you very much matt i understand ....

Sign in to comment.

More Answers (0)

Categories

Find more on Quadratic Programming and Cone Programming in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!