You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Matt Mitchell <go...@gmail.com> on 2012/07/17 00:24:09 UTC
Adding new users at runtime?
I'm thinking about ways I could add new users to the system dynamically. I have an app that gets lots of requests from new users, but there's an opportunity to get prefs before showing the items. So I can see where the anonymous user class would work here, but then what about subsequent requests? Can I insert a new user?
Also, while these requests are happening, they're all getting recorded by an external app. My plan has been to update the recommender with that data On a nightly basis, but how would this workout with users that were added on the fly, since their data will already be in the recommender? Whew, hope this makes sense.
- Matt
Re: Adding new users at runtime?
Posted by Sean Owen <sr...@gmail.com>.
Sure, override refresh()? Yes, call refresh() to make it run when you want.
On Wed, Jul 18, 2012 at 1:31 AM, Matt Mitchell <go...@gmail.com> wrote:
> Thanks Sean. This makes sense. I'll see how far I can get with the
> anonymous user. I wonder, is there any way to hook into when the
> refresh happens? I know that the File based model will watch for
> incremental file additions and run, but can you refresh manually?
> Asking because, maybe I could keep a local, in-memory cache of
> anonyomous user prefs, which I could use until the refresh includes
> the new user data? If the refresh includes a user present in the
> in-memory cache, then I would remove it.
>
>
Re: Adding new users at runtime?
Posted by Matt Mitchell <go...@gmail.com>.
Thanks Sean. This makes sense. I'll see how far I can get with the
anonymous user. I wonder, is there any way to hook into when the
refresh happens? I know that the File based model will watch for
incremental file additions and run, but can you refresh manually?
Asking because, maybe I could keep a local, in-memory cache of
anonyomous user prefs, which I could use until the refresh includes
the new user data? If the refresh includes a user present in the
in-memory cache, then I would remove it.
On Tue, Jul 17, 2012 at 2:37 AM, Sean Owen <sr...@gmail.com> wrote:
> There's not a very clean answer to this. The original design from way back
> when was definitely about reloading a fixed model periodically. So that's
> always an option -- put the users in your database, or update files, or
> whatever backs the model and they'll turn up at the next reload.
>
> The anonymous user hack works OK. No they do not stick around, so you could
> use this to put them in temporarily while they are waiting to appear for
> real. They won't affect other users while they're temporary.
>
> This is the sort of design issue I'm trying to address in my own work, you
> really shouldn't have to jump through hoops for this kind of new data.
>
> Sean
>
> On Tue, Jul 17, 2012 at 1:24 AM, Matt Mitchell <go...@gmail.com> wrote:
>
>> I'm thinking about ways I could add new users to the system dynamically. I
>> have an app that gets lots of requests from new users, but there's an
>> opportunity to get prefs before showing the items. So I can see where the
>> anonymous user class would work here, but then what about subsequent
>> requests? Can I insert a new user?
>>
>> Also, while these requests are happening, they're all getting recorded by
>> an external app. My plan has been to update the recommender with that data
>> On a nightly basis, but how would this workout with users that were added
>> on the fly, since their data will already be in the recommender? Whew, hope
>> this makes sense.
>>
>> - Matt
Re: Adding new users at runtime?
Posted by Sean Owen <sr...@gmail.com>.
There's not a very clean answer to this. The original design from way back
when was definitely about reloading a fixed model periodically. So that's
always an option -- put the users in your database, or update files, or
whatever backs the model and they'll turn up at the next reload.
The anonymous user hack works OK. No they do not stick around, so you could
use this to put them in temporarily while they are waiting to appear for
real. They won't affect other users while they're temporary.
This is the sort of design issue I'm trying to address in my own work, you
really shouldn't have to jump through hoops for this kind of new data.
Sean
On Tue, Jul 17, 2012 at 1:24 AM, Matt Mitchell <go...@gmail.com> wrote:
> I'm thinking about ways I could add new users to the system dynamically. I
> have an app that gets lots of requests from new users, but there's an
> opportunity to get prefs before showing the items. So I can see where the
> anonymous user class would work here, but then what about subsequent
> requests? Can I insert a new user?
>
> Also, while these requests are happening, they're all getting recorded by
> an external app. My plan has been to update the recommender with that data
> On a nightly basis, but how would this workout with users that were added
> on the fly, since their data will already be in the recommender? Whew, hope
> this makes sense.
>
> - Matt