-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-4604][MLLIB] make MatrixFactorizationModel public #3459
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,13 +28,16 @@ import org.apache.spark.rdd.RDD | |
| /** | ||
| * Model representing the result of matrix factorization. | ||
| * | ||
| * NB: If you create the model directly using constructor, please be aware that fast prediction | ||
| * requires cached user/product features and the availability of their partitioning information. | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It might be good to explain what "availability" means. |
||
| * | ||
| * @param rank Rank for the features in this model. | ||
| * @param userFeatures RDD of tuples where each tuple represents the userId and | ||
| * the features computed for this user. | ||
| * @param productFeatures RDD of tuples where each tuple represents the productId | ||
| * and the features computed for this product. | ||
| */ | ||
| class MatrixFactorizationModel private[mllib] ( | ||
| class MatrixFactorizationModel( | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With this now public, it might be good to add either (a) one check upon initialization doing a take(1) and comparing with rank, or (b) runtime checks in the various methods in MatrixFactorizationModel. IMO, it's OK if not since those would both add extra overhead, but perhaps there should be a warning for the constructor noting that the arguments are not checked.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done. |
||
| val rank: Int, | ||
| val userFeatures: RDD[(Int, Array[Double])], | ||
| val productFeatures: RDD[(Int, Array[Double])]) extends Serializable { | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does "NB" mean?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NB = "Nota Bene", just "note well"