org.apache.spark.mllib.recommendation

ALS

object ALS extends Serializable

Top-level methods for calling Alternating Least Squares (ALS) matrix factorization.

Annotations
@Since( "0.8.0" )
Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ALS
  2. Serializable
  3. Serializable
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

    Definition Classes
    AnyRef → Any
  19. def train(ratings: RDD[Rating], rank: Int, iterations: Int): MatrixFactorizationModel

    Train a matrix factorization model given an RDD of ratings given by users to some products, in the form of (userID, productID, rating) pairs.

    Train a matrix factorization model given an RDD of ratings given by users to some products, in the form of (userID, productID, rating) pairs. We approximate the ratings matrix as the product of two lower-rank matrices of a given rank (number of features). To solve for these features, we run a given number of iterations of ALS. The level of parallelism is determined automatically based on the number of partitions in ratings.

    ratings

    RDD of (userID, productID, rating) pairs

    rank

    number of features to use

    iterations

    number of iterations of ALS (recommended: 10-20)

    Annotations
    @Since( "0.8.0" )
  20. def train(ratings: RDD[Rating], rank: Int, iterations: Int, lambda: Double): MatrixFactorizationModel

    Train a matrix factorization model given an RDD of ratings given by users to some products, in the form of (userID, productID, rating) pairs.

    Train a matrix factorization model given an RDD of ratings given by users to some products, in the form of (userID, productID, rating) pairs. We approximate the ratings matrix as the product of two lower-rank matrices of a given rank (number of features). To solve for these features, we run a given number of iterations of ALS. The level of parallelism is determined automatically based on the number of partitions in ratings.

    ratings

    RDD of (userID, productID, rating) pairs

    rank

    number of features to use

    iterations

    number of iterations of ALS (recommended: 10-20)

    lambda

    regularization factor (recommended: 0.01)

    Annotations
    @Since( "0.8.0" )
  21. def train(ratings: RDD[Rating], rank: Int, iterations: Int, lambda: Double, blocks: Int): MatrixFactorizationModel

    Train a matrix factorization model given an RDD of ratings given by users to some products, in the form of (userID, productID, rating) pairs.

    Train a matrix factorization model given an RDD of ratings given by users to some products, in the form of (userID, productID, rating) pairs. We approximate the ratings matrix as the product of two lower-rank matrices of a given rank (number of features). To solve for these features, we run a given number of iterations of ALS. This is done using a level of parallelism given by blocks.

    ratings

    RDD of (userID, productID, rating) pairs

    rank

    number of features to use

    iterations

    number of iterations of ALS (recommended: 10-20)

    lambda

    regularization factor (recommended: 0.01)

    blocks

    level of parallelism to split computation into

    Annotations
    @Since( "0.8.0" )
  22. def train(ratings: RDD[Rating], rank: Int, iterations: Int, lambda: Double, blocks: Int, seed: Long): MatrixFactorizationModel

    Train a matrix factorization model given an RDD of ratings given by users to some products, in the form of (userID, productID, rating) pairs.

    Train a matrix factorization model given an RDD of ratings given by users to some products, in the form of (userID, productID, rating) pairs. We approximate the ratings matrix as the product of two lower-rank matrices of a given rank (number of features). To solve for these features, we run a given number of iterations of ALS. This is done using a level of parallelism given by blocks.

    ratings

    RDD of (userID, productID, rating) pairs

    rank

    number of features to use

    iterations

    number of iterations of ALS (recommended: 10-20)

    lambda

    regularization factor (recommended: 0.01)

    blocks

    level of parallelism to split computation into

    seed

    random seed

    Annotations
    @Since( "0.9.1" )
  23. def trainImplicit(ratings: RDD[Rating], rank: Int, iterations: Int): MatrixFactorizationModel

    Train a matrix factorization model given an RDD of 'implicit preferences' ratings given by users to some products, in the form of (userID, productID, rating) pairs.

    Train a matrix factorization model given an RDD of 'implicit preferences' ratings given by users to some products, in the form of (userID, productID, rating) pairs. We approximate the ratings matrix as the product of two lower-rank matrices of a given rank (number of features). To solve for these features, we run a given number of iterations of ALS. The level of parallelism is determined automatically based on the number of partitions in ratings. Model parameters alpha and lambda are set to reasonable default values

    ratings

    RDD of (userID, productID, rating) pairs

    rank

    number of features to use

    iterations

    number of iterations of ALS (recommended: 10-20)

    Annotations
    @Since( "0.8.1" )
  24. def trainImplicit(ratings: RDD[Rating], rank: Int, iterations: Int, lambda: Double, alpha: Double): MatrixFactorizationModel

    Train a matrix factorization model given an RDD of 'implicit preferences' given by users to some products, in the form of (userID, productID, preference) pairs.

    Train a matrix factorization model given an RDD of 'implicit preferences' given by users to some products, in the form of (userID, productID, preference) pairs. We approximate the ratings matrix as the product of two lower-rank matrices of a given rank (number of features). To solve for these features, we run a given number of iterations of ALS. The level of parallelism is determined automatically based on the number of partitions in ratings.

    ratings

    RDD of (userID, productID, rating) pairs

    rank

    number of features to use

    iterations

    number of iterations of ALS (recommended: 10-20)

    lambda

    regularization factor (recommended: 0.01)

    alpha

    confidence parameter

    Annotations
    @Since( "0.8.1" )
  25. def trainImplicit(ratings: RDD[Rating], rank: Int, iterations: Int, lambda: Double, blocks: Int, alpha: Double): MatrixFactorizationModel

    Train a matrix factorization model given an RDD of 'implicit preferences' given by users to some products, in the form of (userID, productID, preference) pairs.

    Train a matrix factorization model given an RDD of 'implicit preferences' given by users to some products, in the form of (userID, productID, preference) pairs. We approximate the ratings matrix as the product of two lower-rank matrices of a given rank (number of features). To solve for these features, we run a given number of iterations of ALS. This is done using a level of parallelism given by blocks.

    ratings

    RDD of (userID, productID, rating) pairs

    rank

    number of features to use

    iterations

    number of iterations of ALS (recommended: 10-20)

    lambda

    regularization factor (recommended: 0.01)

    blocks

    level of parallelism to split computation into

    alpha

    confidence parameter

    Annotations
    @Since( "0.8.1" )
  26. def trainImplicit(ratings: RDD[Rating], rank: Int, iterations: Int, lambda: Double, blocks: Int, alpha: Double, seed: Long): MatrixFactorizationModel

    Train a matrix factorization model given an RDD of 'implicit preferences' given by users to some products, in the form of (userID, productID, preference) pairs.

    Train a matrix factorization model given an RDD of 'implicit preferences' given by users to some products, in the form of (userID, productID, preference) pairs. We approximate the ratings matrix as the product of two lower-rank matrices of a given rank (number of features). To solve for these features, we run a given number of iterations of ALS. This is done using a level of parallelism given by blocks.

    ratings

    RDD of (userID, productID, rating) pairs

    rank

    number of features to use

    iterations

    number of iterations of ALS (recommended: 10-20)

    lambda

    regularization factor (recommended: 0.01)

    blocks

    level of parallelism to split computation into

    alpha

    confidence parameter

    seed

    random seed

    Annotations
    @Since( "0.8.1" )
  27. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from AnyRef

Inherited from Any

Ungrouped