commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Dunning <ted.dunn...@gmail.com>
Subject Re: [MATH] Looking for example code for the math.random and math.optimization libraries
Date Wed, 08 Dec 2010 19:39:37 GMT
While we are at this sort of talk, R has awesome capabilities in this regard
as well.

On Wed, Dec 8, 2010 at 11:35 AM, Haswell, Joe <josiah.d.haswell@hp.com>wrote:

> If you're starting from scratch, I strongly recommend SciPy/NumPy.  The
> libraries are truly first-rate, Python is absurdly easy to learn, and you
> won't deal with many of the complexities that the Java paradigm forces on
> you.  I don't really want this to turn into a flame-war, but I take the
> "best tool for the job" approach, and I think that, for this sort of thing,
> SciPy/NumPy are about as good as you can get.
>
> You might consider Enthought's Python edition, but ensure that its license
> requirements are appropriate for your context.
>
> Best!
>
>
> Joe H. | HP Software
>
> -----Original Message-----
> From: Rothenberg, Michael [mailto:MICHAEL.ROTHENBERG@nexteraenergy.com]
> Sent: Wednesday, December 08, 2010 11:27 AM
> To: Commons Users List
> Subject: RE: [MATH] Looking for example code for the math.random and
> math.optimization libraries
>
> I have a large 3rd party Monte carlo model/simulator here that we
> discovered was not mean reverting (by a long ways as far as we are
> concerned) when it pulls random data for stochastic runs.  I was told to go
> out and find something, preferably free, to use to pull the seed values for
> the 3rd part modeler.  So I am starting from scratch, but do not have to
> build much.  Once the data is derived I just have to stuff it into an Access
> or MS SQL table that the 3rd party modeler uses.
>
> I think what I am looking for is to 1st define the mean and stddev for two
> variables and set their correlation. 2nd pull a large number of random data
> pairs where the mean for the new data will match the mean for the
> historical.
>
> I'll look further into the GausianRandomGenerator.  I got to looking at the
> Apache Commons library as I am mildly familiar with Java. I assume
> NumPy/SciPy are Python based? I am not familiar with Python, but can always
> learn ;)
>
> Thanks again for your help.
>
> Best regards,
>
> Michael
>
> w: 561.304.5921
> m: 772.263.8343
>
>
> -----Original Message-----
> From: Haswell, Joe [mailto:josiah.d.haswell@hp.com]
> Sent: Wednesday, December 08, 2010 1:07 PM
> To: Commons Users List
> Subject: RE: [MATH] Looking for example code for the math.random and
> math.optimization libraries
>
> Ok.  So, CorrelatedRandomVectorGenerator is an actual implementation.  It
> sounds like you'll want to use the GaussianRandomGenerator implementation of
> NormalizedRandomGenerator.  You might assess Array2DRowRealMatrix suits your
> data, but you have options.  Unless you're using this in an existing Java
> application, you might also consider using NumPy/SciPy, which dramatically
> simplify most scientific computing relative to Java solutions.  Commons-math
> is a good Java math library, but Java's not a great platform for this sort
> of thing.
>
> Joe H.
>
>
> -----Original Message-----
> From: Rothenberg, Michael [mailto:MICHAEL.ROTHENBERG@nexteraenergy.com]
> Sent: Wednesday, December 08, 2010 10:58 AM
> To: Commons Users List
> Subject: RE: [MATH] Looking for example code for the math.random and
> math.optimization libraries
>
> Thanks for the quick response, Joe.  I am trying to pull random data based
> on a distribution to start with.
>
> I have two variables with historical data and a correlation between them:
> power and gas prices.  I am now looking to simulate some relationships.  1st
> step is to pull random power and gas pairs for each time period based on a
> distribution (historical mean/stddev) and correlation. Lognormal is
> preferred, but I can make normal into log normal if needed.
>
> I was browsing through math.random and came across the
> CorrelatedRandomVectorGenerator class.  Sounds like that is right up my
> alley in terms of fitting my needs... but I have no idea how to
> implement/use it.
>
> Thanks in advance for your help!
>
> Best regards,
>
> Michael
>
> w: 561.304.5921
> m: 772.263.8343
>
>
> -----Original Message-----
> From: Haswell, Joe [mailto:josiah.d.haswell@hp.com]
> Sent: Wednesday, December 08, 2010 12:41 PM
> To: Commons Users List
> Subject: RE: [MATH] Looking for example code for the math.random and
> math.optimization libraries
>
> Do you have any specific questions? Hard to point you in the right
> direction or provide help if I don't know what you need.
>
> Joe H.  | HP Software.
>
> -----Original Message-----
> From: Rothenberg, Michael [mailto:MICHAEL.ROTHENBERG@nexteraenergy.com]
> Sent: Wednesday, December 08, 2010 10:38 AM
> To: user@commons.apache.org
> Subject: [MATH] Looking for example code for the math.random and
> math.optimization libraries
>
> Hi all,
>
> I have been reading the JavaDoc and everything else I can find on the
> Commons.Math.Random and .Optimization libraries, but have not figured out
> how to use them.  Does anyone have any code examples/web sites/forums/etc..
> that I can use?
>
> Best regards,
>
> Michael
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message