I would like x (a 100 x 1 matrix, each element must be non-negative) which minimizes the following;
$|| Mx-p ||^2 + λ xS x'$
where λ, M (a 10 x 100 matrix), p (a 10 x 1 matrix), and S (a 100 x 100 matrix) are specified.
I have already tried function "pcls" in a R package "mcgv", but I received an error message saying "Penalized model matrix must have no more columns than rows".
The implementation can be in R, C++, or anything else.
Any help/explanations would be very helpful, thank you very much!
Notice that the x^T is on the left of S since otherwise this wouldn't make sense.
Exactly. Sorry for my mistake.
I took the second way and it was successful! You helped me very much, and I highly appreciate your detailed and easy-to-understand explanation. Thank you so much : )
– I-was-a-Ki Dec 19 '16 at 07:47