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 its full representation, returning the result as three matrices.

Convert an SVD factoring to its full representation, returning the result as three matrices.

Value parameters

u_s_v

the 3-way factorization

Attributes

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 orginal 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