SVD - Décomposition en valeurs singulières

Cette procédure calcule la décomposition en valeurs singulières A = U * SIGMA * transposée(V) d'une matrice.

Utilisation

La procédure stockée SVD a la syntaxe suivante :
SVD matrixA,matrixU,matrixS,matrixVT )
Paramètres
matrixA
Le nom de la matrice d'entrée A.
Type : NVARCHAR(ANY)
matrixU
Le nom de la matrice de sortie U.
Type : NVARCHAR(ANY)
matrixS
Le nom de la matrice de sortie à une colonne S.
Type : NVARCHAR(ANY)
matrixVT
Le nom de la matrice de sortie transpose(V).
Type : NVARCHAR(ANY)
Retours
BOOLEAN VRAI toujours.

Détails

Utilisez "call nzm..vec_to_diag('S','SIGMA') ;" pour créer la matrice diagonale SIGMA à partir de la matrice à une colonne S.

Exemples

call nzm..shape('1,2,3,4,5,6,7,8,9,0',3,3,'A'); 
call nzm..svd('A', 'U', 'S', 'VT');
call nzm..vec_to_diag('S','SIGMA'); 
call nzm..gemm('U', 'SIGMA', 'USIGMA'); 
call nzm..gemm('USIGMA', 'VT', 'A1'); 
call nzm..subtract('A', 'A1', 'A0'); 
call nzm..print('A0');
call nzm..delete_matrix('A');
call nzm..delete_matrix('U');
call nzm..delete_matrix('S');
call nzm..delete_matrix('VT');
call nzm..delete_matrix('SIGMA');
call nzm..delete_matrix('USIGMA');
call nzm..delete_matrix('A0');
call nzm..delete_matrix('A1');

 SHAPE
-------
 t
(1 row)

 SVD
-----
 t
(1 row)

 VEC_TO_DIAG
-------------
 t
(1 row)

 GEMM
------
 t
(1 row)

 GEMM
------
 t
(1 row)

 SUBTRACT
----------
 t
(1 row)

                                                    PRINT
---------------------------------------------------------------------------------------------------------------
 -- matrix: A0 --
 -1.7763568394003e-15, -6.2172489379009e-15, -3.1086244689504e-15
 -1.7763568394003e-15, -1.7763568394003e-15, -4.4408920985006e-15
 -2.6645352591004e-15, -7.105427357601e-15, -7.105427357601e-15
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)

 DELETE_MATRIX
---------------
 t
(1 row)