thanks for your reply , what I exactly want to know is : in package mllib.recommendation , MatrixFactorizationModel have method like recommendProducts , but I didn't find it in package ml.recommendation. how can I do the samething as mllib when I use ml. 2017-03-16
lk_spark 发件人:任弘迪 <ryan.hd....@gmail.com> 发送时间:2017-03-16 10:46 主题:Re: how to call recommend method from ml.recommendation.ALS 收件人:"lk_spark"<lk_sp...@163.com> 抄送:"user.spark"<user@spark.apache.org> if the num of user-item pairs to predict aren't too large, say millions, you could transform the target dataframe and save the result to a hive table, then build cache based on that table for online services. if it's not the case(such as billions of user item pairs to predict), you have to start a service with the model loaded, send user to the service, first match several hundreds of items from all items available which could itself be another service or cache, then transform this user and all items using the model to get prediction, and return items ordered by prediction. On Thu, Mar 16, 2017 at 9:32 AM, lk_spark <lk_sp...@163.com> wrote: hi,all: under spark2.0 ,I wonder to know after trained a ml.recommendation.ALSModel how I can do the recommend action? I try to save the model and load it by MatrixFactorizationModel but got error. 2017-03-16 lk_spark