3.2.12 Singular Value Decomposition

The overloaded svd function performs singular value decomposition in parallel in the database.

The svd function accepts an ore.frame or an ore.tblmatrix object as the x argument. The ore.frame-svd method distributes block SVD computation to parallel processes executing in the database. The method uses the global option ore.parallel to determine the degree of parallelism to employ.

The function returns a list object that contains the d vector and v matrix components of a singular value decomposition of argument x. It does not return the left singular vector matrix u, therefore the argument nu is not used.

For details about the function arguments, invoke help('ore.frame-svd').

Example 3-64 Using the svd Function

USARRESTS <- ore.push(USArrests)
svd(USARRESTS)

Listing for Example 3-64

R> USARRESTS <- ore.push(USArrests)
R> svd(USARRESTS)
$d
[1] 1419.06140  194.82585   45.66134   18.06956

$v
           [,1]        [,2]        [,3]        [,4]
[1,] 0.04239181 -0.01616262  0.06588426  0.99679535
[2,] 0.94395706 -0.32068580 -0.06655170 -0.04094568
[3,] 0.30842767  0.93845891 -0.15496743  0.01234261
[4,] 0.10963744  0.12725666  0.98347101 -0.06760284