Re: is recommendProductsForUsers available in ALS?

2016-01-21 Thread Nick Pentreath
These methods are available in Spark 1.6 On Tue, Jan 19, 2016 at 12:18 AM, Roberto Pagliari < roberto.pagli...@asos.com> wrote: > With Spark 1.5, the following code: > > from pyspark import SparkContext, SparkConf > from pyspark.mllib.recommendation import ALS, Rating > r1 = (1, 1,

is recommendProductsForUsers available in ALS?

2016-01-18 Thread Roberto Pagliari
With Spark 1.5, the following code: from pyspark import SparkContext, SparkConf from pyspark.mllib.recommendation import ALS, Rating r1 = (1, 1, 1.0) r2 = (1, 2, 2.0) r3 = (2, 1, 2.0) ratings = sc.parallelize([r1, r2, r3]) model = ALS.trainImplicit(ratings, 1, seed=10)