class SVD4 extends SVDecomp with Error
The SVD4
class is used to compute the Singular Value Decomposition 'SVD' of
matrix 'aa' using the Golub-Kahan-Reinsch Algorithm.
Factor/decompose matrix 'aa' into the product of three matrices:
aa = uu * a * vv.t
where 'uu' is a matrix of orthogonal eigenvectors of 'aa * aa.t' (LEFT SINGULAR VECTORS) 'vv' is a matrix of orthogonal eigenvectors of 'aa.t * aa' (RIGHT SINGULAR VECTORS) and 'a' is a diagonal matrix of square roots of eigenvalues of 'aa.t * aa' & 'aa * aa.t' (SINGULAR VALUES). FIX: need to reorder so singular values are in decreasing order. FIX: make the singular values positive ------------------------------------------------------------------------------
- Alphabetic
- By Inheritance
- SVD4
- Error
- SVDecomp
- Factorization
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
Type Members
- type FactorType = (MatriD, VectoD, MatriD)
Factor type contains 'u, s, v' which are the left orthogonal matrix, the diagonal matrix/vector containing singular values and the right orthogonal matrix.
Factor type contains 'u, s, v' which are the left orthogonal matrix, the diagonal matrix/vector containing singular values and the right orthogonal matrix.
- Definition Classes
- SVDecomp
- type FactorTypeFull = (MatriD, MatriD, MatriD)
- Definition Classes
- SVDecomp
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def conditionNum: Double
Compute the condition number of 'this' matrix, i.e., the ratio of the largest singular value to the smallest.
Compute the condition number of 'this' matrix, i.e., the ratio of the largest singular value to the smallest. Note, if not of full rank, it will be infinity.
- Definition Classes
- SVDecomp
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def factor(): SVDecomp
Factor/deflate the matrix by iteratively turning elements not in the main diagonal to zero.
Factor/deflate the matrix by iteratively turning elements not in the main diagonal to zero.
- Definition Classes
- SVDecomp → Factorization
- def factor1(): MatriD
Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the first matrix.
Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the first matrix.
- Definition Classes
- Factorization
- def factor12(): (MatriD, MatriD)
Factor a matrix into the product of two matrices, e.g., 'a = l * l.t' or a = q * r, returning both the first and second matrices.
Factor a matrix into the product of two matrices, e.g., 'a = l * l.t' or a = q * r, returning both the first and second matrices.
- Definition Classes
- Factorization
- def factor123(): FactorType
Factor matrix 'a' into the product of a matrix of left singular vectors 'uu', a vector of singular values 's' and a matrix of right singular vectors 'vv' such that 'a = uu ** s * vv.t'.
- def factor2(): MatriD
Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the second matrix.
Factor a matrix into the product of two matrices, e.g., 'a = l * l.t', returning only the second matrix.
- Definition Classes
- Factorization
- val factored: Boolean
Flag indicating whether the matrix has been factored
Flag indicating whether the matrix has been factored
- Attributes
- protected
- Definition Classes
- Factorization
- def factors: (MatriD, MatriD)
Return the two factored matrices.
Return the two factored matrices.
- Definition Classes
- SVDecomp → Factorization
- final def flaw(method: String, message: String): Unit
Show the flaw by printing the error message.
Show the flaw by printing the error message.
- method
the method where the error occurred
- message
the error message
- Definition Classes
- Error
- def flip(u: MatriD, v: MatriD): Unit
Flip negative main diagonal elements in the singular vectors to positive.
Flip negative main diagonal elements in the singular vectors to positive.
- u
the left orthongonal matrix
- v
the right orthongonal matrix
- Definition Classes
- SVDecomp
- def flip(u: MatriD, s: VectoD): Unit
Flip negative singular values to positive and set singular values close to zero to zero.
Flip negative singular values to positive and set singular values close to zero to zero.
- u
the left orthongonal matrix
- s
the vector of singular values
- Definition Classes
- SVDecomp
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def reorder(ft: FactorType): Unit
Reorder the singular values to be in non-increasing order.
Reorder the singular values to be in non-increasing order. Must swap singular vectors in lock step with singular values. To minimize the number of swaps, selection sort is used.
- ft
the factored matrix (u, s, v)
- Definition Classes
- SVDecomp
- def solve(b: VectorD): VectoD
Solve for
x
ina^t*a*x = b
using
SVD.
Solve for
x
ina^t*a*x = b
using
SVD.
- b
the constant vector
- def solve(b: VectoD): VectoD
Solve for 'x' in 'a^t*a*x = b' using
SVD
.Solve for 'x' in 'a^t*a*x = b' using
SVD
.- b
the constant vector
- Definition Classes
- SVDecomp → Factorization
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated