Fac_SVD

scalation.mathstat.Fac_SVD
See theFac_SVD companion class
object Fac_SVD

The Fac_SVD object provides several test matrices as well as methods for making full representations, reducing dimensionality, determining rank and testing SVD factorizations.

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Fac_SVD.type

Members list

Value members

Concrete methods

Convert an SVD factoring to a full matrix representation, returning the result as three matrices having the following dimensions: U (m-by-n), S (n-by-n) and V (n-by-n). This is the compact SVD representation, see the next methods of a full SVD representation.

Convert an SVD factoring to a full matrix representation, returning the result as three matrices having the following dimensions: U (m-by-n), S (n-by-n) and V (n-by-n). This is the compact SVD representation, see the next methods of a full SVD representation.

Value parameters

u_s_v

the 3-way factorization

Attributes

Create a full SVD factorization (rather than a compact one) where the three matrices have the following dimensions: U (m-by-m), S (m-by-n) and V (n-by-n).

Create a full SVD factorization (rather than a compact one) where the three matrices have the following dimensions: U (m-by-m), S (m-by-n) and V (n-by-n).

Value parameters

a

the m-by-n matrix to factor/decompose (requires m >= n)

Attributes

See also

Return a new normalized m-dimensional vector that is orthogonal to all columns in an orthonormal matrix u of dimension m-by-n (m > n), Use the Gram-Schmidt (SG) Orthogonalization Algorithm. v = a - Σ (a ⋅ uᵢ) * uᵢ

Return a new normalized m-dimensional vector that is orthogonal to all columns in an orthonormal matrix u of dimension m-by-n (m > n), Use the Gram-Schmidt (SG) Orthogonalization Algorithm. v = a - Σ (a ⋅ uᵢ) * uᵢ

Value parameters

u

the given m-by-n orthonormal matrix

Attributes

See also
def rank(s: VectorD): Int

Determine the rank of a matrix by counting the number of non-zero singular values. The implementation assumes zero singular values are last in the vector.

Determine the rank of a matrix by counting the number of non-zero singular values. The implementation assumes zero singular values are last in the vector.

Value parameters

s

the vector of singular values for the matrix whose rank is sought

Attributes

def reduce(u_s_v: FactorType, k: Int): FactorType

Reduce the dimensionality of the u, s and v matrices from n to k. If k = rank, there is no loss of information; when k < rank, multiplying the three matrices results in an approximation (little is lost so long as the singular values set to zero (i.e., clipped) are small).

Reduce the dimensionality of the u, s and v matrices from n to k. If k = rank, there is no loss of information; when k < rank, multiplying the three matrices results in an approximation (little is lost so long as the singular values set to zero (i.e., clipped) are small).

Value parameters

k

the desired dimensionality

u_s_v

the 3-way factorization

Attributes

def test(a: MatrixD, svd: Fac_SVD, name: String): Unit

Test the SVD Factorization algorithm on matrix a by factoring the matrix into a left matrix u, a vector s, and a right matrix v. Then multiply back to recover the original matrix u *~ s * v.t.

Test the SVD Factorization algorithm on matrix a by factoring the matrix into a left matrix u, a vector s, and a right matrix v. Then multiply back to recover the original matrix u *~ s * v.t.

Value parameters

a

the original matrix

name

the name of the test case

u_s_v

the given matrix a factored into three components

Attributes

Concrete fields

val a1: MatrixD
val a2: MatrixD
val a3: MatrixD
val a4: MatrixD
val a5: MatrixD
val a6: MatrixD
val a7: MatrixD
val a8: MatrixD