Was "user" presented in training? We can put a check there and return
NaN if the user is not included in the model. -Xiangrui

On Mon, Nov 3, 2014 at 5:25 PM, Debasish Das <debasish.da...@gmail.com> wrote:
> Hi,
>
> I am testing MatrixFactorizationModel.predict(user: Int, product: Int) but
> the code fails on userFeatures.lookup(user).head
>
> In computeRmse MatrixFactorizationModel.predict(RDD[(Int, Int)]) has been
> called and in all the test-cases that API has been used...
>
> I can perhaps refactor my code to do the same but I was wondering whether
> people test the lookup(user) version of the code..
>
> Do I need to cache the model to make it work ? I think right now default is
> STORAGE_AND_DISK...
>
> Thanks.
> Deb

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@spark.apache.org
For additional commands, e-mail: dev-h...@spark.apache.org

Reply via email to