【发布时间】:2018-12-11 17:15:18
【问题描述】:
我正在尝试为用户显示电影推荐列表。该模型已经过训练,但在尝试显示预测时出现错误。
als = ALS(maxIter=5, regParam=0.01, userCol="userID",
itemCol="movieID", ratingCol="rating")
# ratings is a DataFrame of (movieID, rating, userID)
model = als.fit(ratings)
# allMovies is a DataFrame of (movieID, userID)
# it has userID=0 and all distinct movieID
recommendations = model.transform(allMovies)
recommendations.take(20)
使用from pyspark.ml.recommendation.ALS 库和
运行最后一行时,出现错误
Detected cartesian product for LEFT OUTER join between logical plans.
为什么会这样?谢谢!
【问题讨论】:
标签: apache-spark pyspark