apache-sparkpysparkals

I want to make predict function and recommendProducts function in spark ALSModel


I am studying pyspark.

ml als does not support the "predict(user,product)" function in mllib als. How can I implement the predict(user,product) function? thank you


Solution

  • Why u need to create custom function u have transform function that is already there for predicting

    predictions = model.transform(test)