commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gilles <gil...@harfang.homelinux.org>
Subject Re: [math] Using optimization package for non linear equations
Date Thu, 28 Sep 2017 14:20:44 GMT
Hi Vladimir.

On Thu, 28 Sep 2017 09:37:15 -0400, Vladimir Blagojevic wrote:
> I've read optimization guide (http://commons.apache.org/pro
> per/commons-math/userguide/optimization.html) yet I'm still unsure 
> about how
> to apply optimization examples in my case.

The unit tests provide working examples of how to use the
library, e.g.:
   
https://git1-us-west.apache.org/repos/asf?p=commons-math.git;a=blob;f=src/test/java/org/apache/commons/math4/fitting/leastsquares/StraightLineProblem.java
should help you get started.

HTH,
Gilles

> I have a set of nonlinear equations in the form:
>
> e^(qt)S - e^(rt)K1 = b1
> e^(qt)S - e^(rt)K2 = b2
> ...
> e^(qt)S - e^(rt)Kn = bn
>
> r and q are unknown variables (parameters?), while S, t, K1...Kn are 
> known
> scalars. b1...bn is a set of known scalar observations that could 
> contain
> errors.
>
> Since r,q are two unknown variables I could simply solve the set of 
> two
> equations b1,b2 and find the desired q and r. However, those two 
> particular
> observations b1 and b2 could contain the most error in observation 
> set data
> thus propagating the error to r and q.
>
> How could I use optimization package to find optimal r and q for the 
> entire
> set of observations that would minimize the sum of the difference?
>
> Regards,
> Vladimir


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


Mime
View raw message