Post Reply 
SVD Only With Matrix of Full Rank?
04-03-2015, 03:07 PM
Post: #2
RE: SVD Only With Matrix of Full Rank?
(04-03-2015 11:20 AM)mark4flies Wrote:  I am testing some code for multiple correspondence analysis, which relies on the SVD for dimension reduction. The example is 5x4 (5 observations on 4 responses) that is essentially two dimensions (last two singular values are essentially 0):

M1 = [ [8 2 2 -6], [5 0 3 -4], [-2 -3 3 1], [2 3 -3 -1], [4 6 -6 -2] ]

The result of SVD( M1 ) is this error (Textbook mode):

"0 as singular value, not implemented Error: Bad Argument Value"

(1) So the SVD() function does not allow less than full rank matrices?

Also, putting M1 on the stack and evaluating SVD results in this error (RPN Mode):

"SVD(NULL) Error: Bad Argument Type"

(2) How is SVD supposed to work in RPN mode then?

Thanks for help. I searched documentation (HP Prime and CAS) and other threads mentioning SVD first but did not see these questions yet.

For (2), you would type: COMMAND(n) where n is the number of arguments to take from the stack. So in your case, SVD(1) in RPN mode.

As for (1), this is due to an incomplete implementation in which the vectors of the unitary matrices are computed using the inverse of the singular values.

Once I have some free time to finish up my own implementation of the SVD, I'll post it here. It's basically an implementation of the "standard" algorithm (Householder reflections + Givens rotations)

Graph 3D | QPI | SolveSys
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: SVD Only With Matrix of Full Rank? - Han - 04-03-2015 03:07 PM



User(s) browsing this thread: 1 Guest(s)