\PhpOffice\PhpSpreadsheet\Shared\JAMASingularValueDecomposition

For an m-by-n matrix A with m >= n, the singular value decomposition is an m-by-n orthogonal matrix U, an n-by-n diagonal matrix S, and an n-by-n orthogonal matrix V so that A = U*S*V'.

The singular values, sigma[$k] = S[$k][$k], are ordered so that sigma[0] >= sigma[1] >= ... >= sigma[n-1].

The singular value decompostion always exists, so the constructor will never fail. The matrix condition number and the effective numerical rank can be computed from this decomposition.

Summary

Methods
Properties
Constants
__construct()
getU()
getV()
getSingularValues()
getS()
norm2()
cond()
rank()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
$U
$V
$s
$m
$n
N/A

Properties

$U

$U : array

Internal storage of U.

Type

array

$V

$V : array

Internal storage of V.

Type

array

$s

$s : array

Internal storage of singular values.

Type

array

$m

$m : int

Row dimension.

Type

int

$n

$n : int

Column dimension.

Type

int

Methods

__construct()

__construct(mixed  $Arg) : mixed

Construct the singular value decomposition.

Derived from LINPACK code.

Parameters

mixed $Arg

Rectangular matrix

Returns

mixed —

getU()

getU() : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix

Return the left singular vectors.

Returns

\PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix —

U

getV()

getV() : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix

Return the right singular vectors.

Returns

\PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix —

V

getSingularValues()

getSingularValues() : array

Return the one-dimensional array of singular values.

Returns

array —

diagonal of S

getS()

getS() : \PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix

Return the diagonal matrix of singular values.

Returns

\PhpOffice\PhpSpreadsheet\Shared\JAMA\Matrix —

S

norm2()

norm2() : float

Two norm.

Returns

float —

max(S)

cond()

cond() : float

Two norm condition number.

Returns

float —

max(S)/min(S)

rank()

rank() : int

Effective numerical matrix rank.

Returns

int —

Number of nonnegligible singular values