Skip to content

Commit a624c12

Browse files
committed
make MatrixFactorizationModel public
1 parent 0fe54cf commit a624c12

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

mllib/src/main/scala/org/apache/spark/mllib/recommendation/MatrixFactorizationModel.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ import org.apache.spark.rdd.RDD
2828
/**
2929
* Model representing the result of matrix factorization.
3030
*
31+
* NB: If you create the model directly using constructor, please be aware that fast prediction
32+
* requires cached user/product features and the availability of their partitioning information.
33+
*
3134
* @param rank Rank for the features in this model.
3235
* @param userFeatures RDD of tuples where each tuple represents the userId and
3336
* the features computed for this user.
3437
* @param productFeatures RDD of tuples where each tuple represents the productId
3538
* and the features computed for this product.
3639
*/
37-
class MatrixFactorizationModel private[mllib] (
40+
class MatrixFactorizationModel(
3841
val rank: Int,
3942
val userFeatures: RDD[(Int, Array[Double])],
4043
val productFeatures: RDD[(Int, Array[Double])]) extends Serializable {

0 commit comments

Comments
 (0)