Norm square of a function SVM


(Omar Samer) #1

Hello , i had a problem with squaring a norm function
the function is

0.5*||(W.’)*sqrt(Rx)||^2 .

W is a 201 vector
Rx is a 20
20 Matrix
i have tried

0.5*(square(norm(W.’*(sqrt(Rx)),2)
but there is a discipline error


(Mark L. Stone) #2

Depending on the context, perhaps you don’t really need to square the norm.

If you do need to square the norm, you can use square_pos instead of square. Or if y is the argument of norm,. you can use y'*y.


(Omar Samer) #3

The function at first was

0.5*W.'RxW + summation(eita+eitaDash)

The problem was that the part first part of the function had a problem as Rx turned the expresion to Convex/concave


(Mark L. Stone) #4

I don’t understand. Has your problem been resolved or do you still have a problem? If the latter, you need to provide more information.

If
0.5*norm(W.’*(sqrt(Rx)),2)
is valid, then
0.5*(square_pos(norm(W.’*(sqrt(Rx)),2)
should be valid.

If 0.5*norm(W.’*(sqrt(Rx)),2)
is not valid
then you need to show your complete problem, so that we can understand what the argument of norm is.


(Omar Samer) #5

It is valid and it worked , thank you