You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mahout.apache.org by Lance Norskog <go...@gmail.com> on 2011/04/11 03:12:11 UTC

More for the refactor wish-list

Just one MahoutException, rather than various this-es&thats. Or
MahoutException (declared) and MahoutError (non-declared).

There are three iterator systems for preferences in the recommender subsystem.

-- 
Lance Norskog
goksron@gmail.com

Re: More for the refactor wish-list

Posted by Sean Owen <sr...@gmail.com>.
You can get an Iterator from the List. Indeed it's a tradeoff of
flexibility for the caller versus work for the implementation. It
seems like not such a big deal to make the implementations provide a
whole List for the caller. After all, the caller said how many things
it wanted, and the number is typically hundreds, not millions. So a
List felt more appropriate, and, there was not a need to return a
streaming view of the results because it was large. There are other
cases where an iterator is returned, for example listing all users,
since the total size of the result would be huge otherwise.

On Tue, Apr 12, 2011 at 4:10 AM, Lance Norskog <go...@gmail.com> wrote:
> Looking at the Recommender stuff again, I remember now:
> Recommender.recommend() methods should just return an Iterator. At
> present they must return a List, which means they must build a List of
> all RecommendedItems at once.
>
> On Mon, Apr 11, 2011 at 8:04 PM, Lance Norskog <go...@gmail.com> wrote:
>> A year ago when I started with recommenders, there were places where I
>> had to implement (Java) arrays of Preferences for one piece and
>> PreferenceArray for another piece. Now, I cannot find the part with
>> the Java arrays. Never mind.
>>
>> On Mon, Apr 11, 2011 at 12:18 AM, Sean Owen <sr...@gmail.com> wrote:
>>> What do you mean by this?
>>>
>>> On Mon, Apr 11, 2011 at 2:12 AM, Lance Norskog <go...@gmail.com> wrote:
>>>> There are three iterator systems for preferences in the recommender subsystem.
>>>
>>
>>
>>
>> --
>> Lance Norskog
>> goksron@gmail.com
>>
>
>
>
> --
> Lance Norskog
> goksron@gmail.com
>

Re: More for the refactor wish-list

Posted by Lance Norskog <go...@gmail.com>.
Looking at the Recommender stuff again, I remember now:
Recommender.recommend() methods should just return an Iterator. At
present they must return a List, which means they must build a List of
all RecommendedItems at once.

On Mon, Apr 11, 2011 at 8:04 PM, Lance Norskog <go...@gmail.com> wrote:
> A year ago when I started with recommenders, there were places where I
> had to implement (Java) arrays of Preferences for one piece and
> PreferenceArray for another piece. Now, I cannot find the part with
> the Java arrays. Never mind.
>
> On Mon, Apr 11, 2011 at 12:18 AM, Sean Owen <sr...@gmail.com> wrote:
>> What do you mean by this?
>>
>> On Mon, Apr 11, 2011 at 2:12 AM, Lance Norskog <go...@gmail.com> wrote:
>>> There are three iterator systems for preferences in the recommender subsystem.
>>
>
>
>
> --
> Lance Norskog
> goksron@gmail.com
>



-- 
Lance Norskog
goksron@gmail.com

Re: More for the refactor wish-list

Posted by Sean Owen <sr...@gmail.com>.
What do you mean by this?

On Mon, Apr 11, 2011 at 2:12 AM, Lance Norskog <go...@gmail.com> wrote:
> There are three iterator systems for preferences in the recommender subsystem.