Packages

class SVDImputed extends SVDecomp

The SVDImputed class is used to predict the missing values of an input matrix by employing the concept of column mean imputation and then applying Singular Value Decomposition to factor the matrix. Once the factors are obtained the missing value in the matrix is obtained as the dot product of 'p' and 'q', where

p = u * sqrt(s) left orthogonal matrix * Singular Values Vector q = sqrt(s) * v.t singular values vector * transpose of right orthogonal matrix predict (i, j) = p dot q


Linear Supertypes
SVDecomp, Factorization, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SVDImputed
  2. SVDecomp
  3. Factorization
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SVDImputed(a: MatrixD, k: Int)

    a

    the input data matrix

    k

    the number of factors

Type Members

  1. 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
  2. type FactorTypeFull = (MatriD, MatriD, MatriD)
    Definition Classes
    SVDecomp

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  6. 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
  7. def denormalize(i: Int): Double

    Create a row denormalized version of 'this' matrix and return the denormalized value of the row.

    Create a row denormalized version of 'this' matrix and return the denormalized value of the row.

    i

    the row id

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. 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
    SVDecompFactorization
  11. 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
  12. 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
  13. def factor123(): FactorType

    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. Then return the vector of singular values (i.e., the main diagonal), along with the left and right singular matrices.

    Definition Classes
    SVDecomp
  14. 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
  15. val factored: Boolean

    Flag indicating whether the matrix has been factored

    Flag indicating whether the matrix has been factored

    Attributes
    protected
    Definition Classes
    Factorization
  16. def factors: (MatriD, MatriD)

    Return the two factored matrices.

    Return the two factored matrices.

    Definition Classes
    SVDecompFactorization
  17. 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
  18. 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
  19. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  20. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  21. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  22. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  23. def normalize(ia: MatrixD): MatrixD

    Create a row normalized version of 'this' matrix.

    Create a row normalized version of 'this' matrix. For all values that are not 0 replace with self - row mean (mean calculation doesnot include 0s).

    ia

    the column mean inputed matrix

  24. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  25. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. var p: MatriD
  27. def predict(i: Int, j: Int): Double

    Predict the final value for a missing value in the matrix.

    Predict the final value for a missing value in the matrix.

    i

    the row id

    j

    the column id

    See also

    Application of Dimensionality Reduction in Recommender System -- A Case Study

    www.dtic.mil/get-tr-doc/pdf?AD=ADA439541

  28. var q: MatriD
  29. 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
  30. 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
    SVDecompFactorization
  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. def train(factors: FactorType): Unit

    Train the model to myield the 'p' and 'a' matices using the dataset.

    Train the model to myield the 'p' and 'a' matices using the dataset.

    factors

    the u, s and v from SVD factorization

    See also

    Application of Dimensionality Reduction in Recommender System -- A Case Study

    www.dtic.mil/get-tr-doc/pdf?AD=ADA439541

  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  36. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from SVDecomp

Inherited from Factorization

Inherited from AnyRef

Inherited from Any

Ungrouped