svd

object svd extends UFunc

Computes the SVD of a M-by-N matrix Returns an M-by-M matrix U, a vector of singular values, and a N-by-N matrix V'

trait UFunc
trait HasOps
class Object
trait Matchable
class Any
svd.type

Type members

Classlikes

case class SVD[M, V](leftVectors: M, singularValues: V, rightVectors: M)
object reduced extends UFunc

Option for computing part of the M-by-N matrix U: The first min(M,N) columns of U and the first min(M,N) rows of V**T are returned in the arrays U and VT;

Option for computing part of the M-by-N matrix U: The first min(M,N) columns of U and the first min(M,N) rows of V**T are returned in the arrays U and VT;

Inherited types

type Impl[V, VR] = UImpl[UFunc, V, VR]
Inherited from:
UFunc
type Impl2[V1, V2, VR] = UImpl2[UFunc, V1, V2, VR]
Inherited from:
UFunc
type Impl3[V1, V2, V3, VR] = UImpl3[UFunc, V1, V2, V3, VR]
Inherited from:
UFunc
type Impl4[V1, V2, V3, V4, VR] = UImpl4[UFunc, V1, V2, V3, V4, VR]
Inherited from:
UFunc
Inherited from:
UFunc
type InPlaceImpl2[V1, V2] = InPlaceImpl2[UFunc, V1, V2]
Inherited from:
UFunc
type InPlaceImpl3[V1, V2, V3] = InPlaceImpl3[UFunc, V1, V2, V3]
Inherited from:
UFunc
type SinkImpl[S, V] = SinkImpl[UFunc, S, V]
Inherited from:
UFunc
type SinkImpl2[S, V1, V2] = SinkImpl2[UFunc, S, V1, V2]
Inherited from:
UFunc
type SinkImpl3[S, V1, V2, V3] = SinkImpl3[UFunc, S, V1, V2, V3]
Inherited from:
UFunc

Value members

Inherited methods

final def apply[V1, V2, V3, V4, VR](v1: V1, v2: V2, v3: V3, v4: V4)(implicit impl: Impl4[V1, V2, V3, V4, VR]): VR
Inherited from:
UFunc
final def apply[V1, @specialized(Int, Double, Float) V2, @specialized(Int, Double, Float) V3, @specialized(Int, Double, Float) VR](v1: V1, v2: V2, v3: V3)(implicit impl: Impl3[V1, V2, V3, VR]): VR
Inherited from:
UFunc
final def apply[@specialized(Int, Double, Float) V1, @specialized(Int, Double, Float) V2, @specialized(Int, Double, Float) VR](v1: V1, v2: V2)(implicit impl: Impl2[V1, V2, VR]): VR
Inherited from:
UFunc
final def apply[@specialized(Int, Double, Float) V, @specialized(Int, Double, Float) VR](v: V)(implicit impl: Impl[V, VR]): VR
Inherited from:
UFunc
final def inPlace[V, V2, V3](v: V, v2: V2, v3: V3)(implicit impl: InPlaceImpl3[svd.type, V, V2, V3]): V
Inherited from:
UFunc
final def inPlace[V, V2](v: V, v2: V2)(implicit impl: InPlaceImpl2[svd.type, V, V2]): V
Inherited from:
UFunc
final def inPlace[V](v: V)(implicit impl: InPlaceImpl[svd.type, V]): V
Inherited from:
UFunc
final def withSink[S](s: S): WithSinkHelp[svd.type, S]
Inherited from:
UFunc

Implicits

Implicits

implicit def Svd_Sparse_Impl[Mat, MatTranspose](implicit mul: OpMulMatrix_Mat_DV_eq_DV[Mat], trans: CanTranspose[Mat, MatTranspose], mulTrans: OpMulMatrix_Mat_DV_eq_DV[MatTranspose], dimImpl: Impl[Mat, (Int, Int)]): Impl3[Mat, Int, Double, DenseSVD]

Implementation of svds for a sparse matrix. The caller provides two operations: mul - matrix multiplies a DenseVector, and trans - matrix transpose.

Implementation of svds for a sparse matrix. The caller provides two operations: mul - matrix multiplies a DenseVector, and trans - matrix transpose.

Type parameters:
Mat

Type of the input matrix of size n*m.

MatTranspose

Type of the transpose of input matrix of size m*n.

Value parameters:
mul

Operation that multiples a matrix with a DenseVector. Example:

implicit object Op_Mul_Mat_V extends OpMulMatrixDenseVector[UserMatrixType] {
 def apply(mt: UserMatrixType, iv: DenseVector[Double]) = {
   // return another DenseVector[Double] = mt * iv
 }
}
mulTrans

Operation that multiples a transposed matrix with a DenseVector. Example:

// if UserMatrixType and UserMatrixTypeTranspose are actually the same type, you do not need this
implicit object Op_Mul_Mat_V extends OpMulMatrixDenseVector[UserMatrixTypeTranspose] {
 def apply(mtTrans: UserMatrixTypeTranspose, iv: DenseVector[Double]) = {
   // return another DenseVector[Double] = mtTrans * iv
 }
}
trans

Operator for transposing the matrix. Example:

implicit object Op_Mat_Trans extends CanTranspose[UserMatrixType, UserMatrixTypeTranspose] {
 def apply(mt: UserMatrixType) = {
   // return a UserMatrixTypeTranspose which is the transpose of mt
 }
}
Returns:

Left singular vectors matrix of size nk, singular value vector of length k, and transpose of right singular vectors matrix of size km.