You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Phil Steitz <ph...@steitz.com> on 2003/05/13 03:49:17 UTC

[math] Random data and lang.math.RandomUtils

I am pulling together another submission that includes the random data 
generation stuff that sent us down this path and I need to decide what 
to submit as patches to lang's RandomUtil's implementation and what to 
include here.  Here is my current plan:

nextIntBetween(lower,upper), nextLongBetween(lower,upper), 
nextGaussian(mu,sigma) go to lang.math.RandomUtils.

nextExponential(lambda), nextPoisson(lambda) and some other parametric 
generators are included in a new math.DataGeneration class that exposes 
all of these (using the lang implemention for uniform, Gaussian 
deviates) as well as the following:

* random values generated using an empirical probability distribution
   estimated from an input file (i.e., values distributed "like" those in
   the input file)

* random values generated by randomly selecting values from a vector
   read from a file and stored in memory

* values generated by replaying the values in the input file repeatedly

Right now, I have a RandomData class that generates all of the 
parametric stuff, an EmpiricalDistribution class that does density 
estimation from an input file and a ValueServer that uses the two of 
these to support data generation in all of the modes described above. So 
what I am thinking about is combining them all into one.  The 
non-parametric data generation modes are really useful in simulation, 
since you can feed them with observed data.  Thoughts?

Phil


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [math] Random data and lang.math.RandomUtils

Posted by Phil Steitz <ph...@steitz.com>.
robert burrell donkin wrote:
> a few observations:
> 
> 1. there isn't really any harm in (some) duplication between math and lang.
> 2. what lang wants to include is an issue best left to the lang component.
> 3. there isn't any reason why stuff can't be refactored later. it's 
> easier to discuss code in CVS.

Thanks.  I will submit this with minimal refactoring and we can talk 
about it in concrete terms.

Phil

> 
> - robert
> 
> On Tuesday, May 13, 2003, at 02:49 AM, Phil Steitz wrote:
> 
>> I am pulling together another submission that includes the random data 
>> generation stuff that sent us down this path and I need to decide what 
>> to submit as patches to lang's RandomUtil's implementation and what to 
>> include here.  Here is my current plan:
>>
>> nextIntBetween(lower,upper), nextLongBetween(lower,upper), 
>> nextGaussian(mu,sigma) go to lang.math.RandomUtils.
>>
>> nextExponential(lambda), nextPoisson(lambda) and some other parametric 
>> generators are included in a new math.DataGeneration class that 
>> exposes all of these (using the lang implemention for uniform, 
>> Gaussian deviates)
>>  as well as the following:
>>
>> * random values generated using an empirical probability distribution
>>   estimated from an input file (i.e., values distributed "like" those in
>>   the input file)
>>
>> * random values generated by randomly selecting values from a vector
>>   read from a file and stored in memory
>>
>> * values generated by replaying the values in the input file repeatedly
>>
>> Right now, I have a RandomData class that generates all of the 
>> parametric stuff, an EmpiricalDistribution class that does density 
>> estimation from an input file and a ValueServer that uses the two of 
>> these to support data generation in all of the modes described above. 
>> So what I am thinking about is combining them all into one.  The 
>> non-parametric data generation modes are really useful in simulation, 
>> since you can feed them with observed data.  Thoughts?
>>
>> Phil
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>>
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
> 




---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Re: [math] Random data and lang.math.RandomUtils

Posted by robert burrell donkin <ro...@blueyonder.co.uk>.
a few observations:

1. there isn't really any harm in (some) duplication between math and lang.
2. what lang wants to include is an issue best left to the lang component.
3. there isn't any reason why stuff can't be refactored later. it's easier 
to discuss code in CVS.

- robert

On Tuesday, May 13, 2003, at 02:49 AM, Phil Steitz wrote:

> I am pulling together another submission that includes the random data 
> generation stuff that sent us down this path and I need to decide what to 
> submit as patches to lang's RandomUtil's implementation and what to 
> include here.  Here is my current plan:
>
> nextIntBetween(lower,upper), nextLongBetween(lower,upper), 
> nextGaussian(mu,sigma) go to lang.math.RandomUtils.
>
> nextExponential(lambda), nextPoisson(lambda) and some other parametric 
> generators are included in a new math.DataGeneration class that exposes 
> all of these (using the lang implemention for uniform, Gaussian deviates)
>  as well as the following:
>
> * random values generated using an empirical probability distribution
>   estimated from an input file (i.e., values distributed "like" those in
>   the input file)
>
> * random values generated by randomly selecting values from a vector
>   read from a file and stored in memory
>
> * values generated by replaying the values in the input file repeatedly
>
> Right now, I have a RandomData class that generates all of the parametric 
> stuff, an EmpiricalDistribution class that does density estimation from 
> an input file and a ValueServer that uses the two of these to support 
> data generation in all of the modes described above. So what I am 
> thinking about is combining them all into one.  The non-parametric data 
> generation modes are really useful in simulation, since you can feed them 
> with observed data.  Thoughts?
>
> Phil
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org