I Wanted to try an example of ALS machine learning algorithm. And my code works fine, However I do not understand parameter rank
used in algorithm.
I have following code in java
// Build the recommendation model using ALS
int rank = 10;
int numIterations = 10;
MatrixFactorizationModel model = ALS.train(JavaRDD.toRDD(ratings),
rank, numIterations, 0.01);
I have read some where that it is the number of latent factors in the model.
Suppose I have a dataset of (user,product,rating) that has 100 rows. What value should be of rank
(latent factors).