[ 
https://issues.apache.org/jira/browse/MAHOUT-676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13021427#comment-13021427
 ] 

Sean Owen commented on MAHOUT-676:
----------------------------------

I agree that this looks like it duplicates the existing sampling iterators in 
org.apache.mahout.common.iterator. I think it would be fine to improve *those* 
iterators. First perhaps it'd be good to discuss the motivation -- what is the 
problem solved or new function added? For example, this reads the whole input 
into memory, but it could also have operated on an Iterator, like 
SamplingIterator.

A few comments on the patch anyway --

- All fields ought to be private here
- Is there a need for "stop()" really?
- Instead of dealing with null samples everywhere, just set it to an initial 
empty list
- The list should probably be LinkedList if it's going to have elements removed 
off the front


> Random samplers in a modular library
> ------------------------------------
>
>                 Key: MAHOUT-676
>                 URL: https://issues.apache.org/jira/browse/MAHOUT-676
>             Project: Mahout
>          Issue Type: New Feature
>          Components: Math
>            Reporter: Lance Norskog
>            Priority: Minor
>         Attachments: Sampler.patch
>
>
> This is a modular suite of samplers.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to