spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Xiangrui Meng <men...@gmail.com>
Subject Re: MatrixFactorizationModel predict(Int, Int) API
Date Tue, 04 Nov 2014 05:24:09 GMT
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.das83@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: user-unsubscribe@spark.apache.org
For additional commands, e-mail: user-help@spark.apache.org


Mime
View raw message