How to get PySpark ALS for recommendation system to return the test set data?

187 Views Asked by At

I tried to imitate the PySpark ALS Code from this Kaggle https://www.kaggle.com/vikashrajluhaniwal/matrix-factorization-recommendation-using-pyspark

I have noticed that when you use the code

model.recommendForAllUsers(3).show()

the output only consists of the no. of users in the training set (58971 users).

I was wondering how do you also get the recommendation of the test set (other 44819 users.) ?? I've tried searching for other tutorials but I still do not know how to get the prediction of the full dataset.

Or do I just use the parameter of the best model and just train the whole dataset again without splitting ?

Thank you so much for your answers.

0

There are 0 best solutions below