Packages

c

scalation.analytics.recommender

ModelBasedRecommender

class ModelBasedRecommender extends Recommender

The ModelBasedRecommender class is used to perform predictions based on Model based Collaborative Filtering techniques (Pure SVD, Regularized SVD)

Linear Supertypes
Recommender, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ModelBasedRecommender
  2. Recommender
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ModelBasedRecommender(input: MatrixI, m: Int, n: Int)

    input

    original matrix

    m

    number of rows

    n

    number of columns

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. def SVDImp: Unit

    Calculate the final predicted matrix based on pure singular value decomposition

  5. def SVDR: Unit

    Calculate the final predicted matrix based on regularized Singular value decompsition

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  8. def colMeans: VectorD

    Create a vector of mean values of each column without including 0's

  9. def crossValidate(tester: MatrixD): Unit

    Phase 2: Cross validate the final predictions against the test dataset.

    Phase 2: Cross validate the final predictions against the test dataset.

    tester

    testing data matrix

    Definition Classes
    Recommender
  10. def denormalize(i: Int): Double

    Create a column denormalized version of 'this' matrix.

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

  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def error_metrics(input: MatrixI): Unit

    Phase 1: Print MAE and RMSE metrics based on the final predictions for the test dataset.

    Phase 1: Print MAE and RMSE metrics based on the final predictions for the test dataset.

    input

    the test portion of the original 4-column input matrix

    Definition Classes
    Recommender
  14. def genTrain2(train: MatrixI): Unit

    Generates the training matrix for the dataset for Phase 1

    Generates the training matrix for the dataset for Phase 1

    train

    : training data matrix

  15. def genTrainTest(exl: VectorI, input: MatrixI): MatrixD

    Generates the training matrix for the dataset for Phase 2

    Generates the training matrix for the dataset for Phase 2

    exl

    : vector of index values which will be excluded in the train

    input

    : original data matrix

  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def getStats: Array[Statistic]

    Return the variables for the statistics vectors.

    Return the variables for the statistics vectors.

    Definition Classes
    Recommender
  18. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. def impute: Unit

    Column mean Imputation of null values in the input matrix

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def makeRatings(input: MatrixI, m: Int, n: Int): MatrixD

    Convert an original 4-column 'input' integer matrix (i, j, value, timestamp) into a two-dimensional 'ratings' double matrix with 'm' rows and 'n' columns.

    Convert an original 4-column 'input' integer matrix (i, j, value, timestamp) into a two-dimensional 'ratings' double matrix with 'm' rows and 'n' columns. The 'input' matrix has type MatrixI, while the 'ratings' matrix has type MatrixD.

    input

    the original 4-column input data matrix containing ratings, e.g., from a file

    m

    the number of rows for the ratings matrix

    n

    the number of columns for the ratings matrix

    Definition Classes
    Recommender
  22. def minNZ: Double

    Return the minimum non-zero element of the entire matrix

  23. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def normalize: Unit

    Create a column normalized version of 'this' matrix.

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

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

    Generate a rating based on Singular value Decompostion of matrix

    Generate a rating based on Singular value Decompostion of matrix

    i

    user

    j

    item

    Definition Classes
    ModelBasedRecommenderRecommender
  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def test(istart: Int, iend: Int, input: MatrixI): Unit

    Phase 3: Test the accuracy of the predictions and add it to the statistics vector.

    Phase 3: Test the accuracy of the predictions and add it to the statistics vector.

    istart

    the start point

    iend

    the end point

    input

    the original 4-column input matrix

    Definition Classes
    Recommender
  30. def toString(): String
    Definition Classes
    AnyRef → Any
  31. def topk(x: VectorD, k: Int): VectorI

    Return the indices of the 'k' largest values in vector 'x'.

    Return the indices of the 'k' largest values in vector 'x'. FIX - replace with more efficient top-k algorithm

    x

    the input vector

    k

    the number of values to be returned

    Definition Classes
    Recommender
  32. def topk2(x: VectorD, k: Int): Array[Int]

    Return the indices of the 'k' largest values in vector 'x'.

    Return the indices of the 'k' largest values in vector 'x'.

    x

    the input vector

    k

    the number of values to be returned

    Definition Classes
    Recommender
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def zRatings(limit: Int, input: MatrixI): Unit

    Returns a matrix with replacing all values with 0 beyond the interval specified corresponds to Phase 3 of the expermiments

    Returns a matrix with replacing all values with 0 beyond the interval specified corresponds to Phase 3 of the expermiments

    limit

    : interval start point

    input

    : original data matrix

Deprecated Value Members

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

Inherited from Recommender

Inherited from AnyRef

Inherited from Any

Ungrouped