Re: [math] Fit function to data set

2012-07-03 Thread Gilles Sadowski
On Tue, Jul 03, 2012 at 07:09:30PM -0300, Italo Maia wrote: Did you have a look at the classes in the package org.apache.commons.math3.optimization ? No, I did not. Let's see... Which function? This little devil: http://dpaste.com/hold/767050/ *public static double

Re: BOBYQA Optimization - Passing Coefficient Arrays For Objective Function

2012-06-30 Thread Gilles Sadowski
Hi. [When posting to this list, you should always indicate to which Commons project the message is targetted. e.g. in this case by adding a [Math] prefix to the subject line.] I could use some help with this issue. I am not an expert with Java programming. Maybe this should be obvious, so

Re: [math] Gaussian fitter stalls

2012-06-13 Thread Gilles Sadowski
Hello. Thank you very much for creating the unit test - in future, I will do this myself. Thanks also for the analysis - I will try and figure out how to filter the data. If you come out with something, it might become a nice addition to CM. :-) Regards, Gilles

Re: [math] Gaussian fitter stalls

2012-06-12 Thread Gilles Sadowski
On Tue, Jun 12, 2012 at 08:53:05AM -0700, B.Kumar wrote: Hi all! Has anyone had a chance to look at or think about this? Thanks! When you ask for help, please provide a fully-working minimal example, in the form of a Junit test. This will surely speed things up, both for us and for you. In

Re: [math] PolynomialFitter.fit() stalls

2012-05-31 Thread Gilles Sadowski
Hi. Hi, in certain cases I ran into the problem that the PolynomialFitter.fit() method stalls, meaning that it does not return, nor throw an Exception. Is there a way to tell the PolynomialFitter to iterate only N-times to ensure that my program does not stall? My guess is that it will throw

Re: [math] PolynomialFitter.fit() stalls

2012-05-31 Thread Gilles Sadowski
Hi. [snip test case] This looks like a bug. Could you please open a ticket on the bug tracking system[1]? Once the issue is created, you should also upload a fully contained unit test demonstrating the problem. This is most likely related to the GaussNewtonOptimizer Yes,

Re: [math] PolynomialFitter.fit() stalls

2012-05-31 Thread Gilles Sadowski
On Thu, May 31, 2012 at 07:00:58PM +0200, Thomas Neidhart wrote: On 05/31/2012 06:12 PM, Gilles Sadowski wrote: Hi. Hi, in certain cases I ran into the problem that the PolynomialFitter.fit() method stalls, meaning that it does not return, nor throw an Exception. Is there a way to tell

Re: [Math] polynomial equation degre 5

2012-05-23 Thread Gilles Sadowski
Hi. [Since the ML is shared, you should prefix the subject line of your mails with the string [Math] in order to avoid your question being lost.] Could you please tell me what is the best way to find all complex roots of an univariate polynomial equation with degre less than 5 using commons

Re: [math] Usage of DifferentiableMultivariateRealFunction

2012-05-14 Thread Gilles Sadowski
On Mon, May 14, 2012 at 11:14:59AM +0200, Andreas Niekler wrote: Hello, thanks for the reply. But i wonder what is the input for value and gradient. in DifferentiableMultivariateRealFunction this needs to be ^^ Which version of Commons Math

Re: [math] Usage of DifferentiableMultivariateRealFunction

2012-05-14 Thread Gilles Sadowski
Hello. thanks for the reply. But i wonder what is the input for value and gradient. in DifferentiableMultivariateRealFunction this needs to be a double array but what needs to be provided there? The parameters for the function to optimize? Thank you very much again Andreas Do

Re: [math] Gaussian fitter problem

2012-05-13 Thread Gilles Sadowski
Hello. I am using the gaussian fitter. Occasionally, I see that the gaussian curve that it generates goes negative - undershoots the x-axis. How do I avoid this? Please see the attached plot (using JFreeChart). There is no attachement. [Maybe that the list forbids it (?).] Regards, Gilles

Re: [math] UnivariateRealSolver in math3

2012-04-18 Thread Gilles Sadowski
Hi. But isn't this a regression compared to version 2.2 of commons math. There is a lot of commonalities between the Newton solver and the other solvers. If I have a class representing a problem for which I have derivative, lower and upper bounds and initial guess, I can try to solve it

Re: [math] UnivariateRealSolver in math3

2012-04-17 Thread Gilles Sadowski
Hello. I am trying to port my program from commons-math 2.2 to commons-math 3.0. I have several routines that require solvers implementing the interface UnivariateRealSolver. Solvers instance used in the program are BrentSolver, BisectionSolver, SecantSolver, NewtonSolver... Most of

Re: [math] is 3.0 available via a public repository?

2012-03-26 Thread Gilles Sadowski
On Mon, Mar 26, 2012 at 03:11:37PM -0700, billy bob wrote: The most recent version currently on maven central is 2.2.  Any idea when 3.0 will be available? March 5, 2012. ;-) http://search.maven.org/#artifactdetails|org.apache.commons|commons-math3|3.0|jar Regards, Gilles

Re: [math] Why is LaguerreSolver.ComplexSolver private?

2012-03-09 Thread Gilles Sadowski
Hello. Why was org.apache.commons.math3.analysis.solvers.LaguerreSolver.ComplexSolver made private in math 3.0? We used LaguerreSolver.solveAll() in version 2.1, it was deprecated in 2.2 without notice in the API that it would be removed, and now it's gone. When something is deprecated, it

Re: [math] Newton Solver

2012-02-13 Thread Gilles Sadowski
Hello. I am trying to implement a Newton Solver for 'n' equations with 'n' variables. Can the current implementation of Newton Solver work for this case? Which implementation are referring to? Best regards, Gilles - To

Re: [math] Newton Solver

2012-02-13 Thread Gilles Sadowski
On Mon, Feb 13, 2012 at 01:59:54PM +0300, binodc wrote: Newton Solver http://commons.apache.org/math/apidocs/org/apache/commons/math/analysis/solvers/NewtonSolver.html This is a root finder algorithm for which you have to provide an explicit function together with its derivative; so certainly

Re: Query

2012-01-31 Thread Gilles Sadowski
Hello. As this mailing list is shared by many projects, you should prefix the subject line of a new post by the name of the project in square brackets (e.g. like [Math] How to ...). Failing to do so may lead to your message being unnoticed by its target audience. Regards, Gilles On Tue, Jan

[Math] New major release in sight?

2011-11-24 Thread Gilles Sadowski
Hello. The large project in which I'm involved requires that all developers use the same version of a library, and preferrably an official release. My code makes use of the development version of Commons Math[1] and I've been working around the above rule for a lot more time than was initially

Re: [math] A bug in OpenMathRealVector

2011-08-13 Thread Gilles Sadowski
Hello. while testing the implementation of UnmodifiableRealVector which has previously been discussed on Commons Developers, I came across the following problem. The simple code below = import org.apache.commons.math.linear.OpenMapRealVector; import

Re: [math] A bug in OpenMathRealVector

2011-08-13 Thread Gilles Sadowski
Hi. this is now MATH-645. Apparently, you've already found the origin of the bug. I think so; but I left the issue open in case someone wants to give an explanation of why this was not detected with the previously existing unit tests (some of which also exercise ebeMultiply). Regards, Gilles

Re: [MATH]: question about HypergeometricDistributionImpl class

2011-08-11 Thread Gilles Sadowski
Hello. I am using the commons-Math library. I have used the HypergeometricDistributionImpl. I used upperCumulativeProbability method. I have got some probability greater that 1 which is impossible. I would appreciate if you can help me to know why it happens. Thanks, in advance, for your

Re: Commons Math - Problem with deprecated OptimizationException using NelderMead.optimize

2011-08-09 Thread Gilles Sadowski
On Tue, Aug 09, 2011 at 12:22:48PM +0100, Babak wrote: My sincere apologies to you Gilles and other members of this forum. Indeed, there was a problem with the ‘runtime’ classpath. Apparently, in addition to adding the jar in the Java Build Path pane, Libraries tab (invoked in the project

Re: Commons Math - Problem with deprecated OptimizationException using NelderMead.optimize

2011-08-08 Thread Gilles Sadowski
On Mon, Aug 08, 2011 at 04:44:15PM +0100, Babak wrote: Hi, I am new to this forum and this is actually the first time that I use Apache Commons Math. I would like use NelderMead class (in optimization.direct package) for minimizing the parameters of the function that I wrote (which

Re: [CLI] Command-line arguments and option with mulitple arguments

2011-06-03 Thread Gilles Sadowski
Hi Emmanuel. Thanks for your reply. I'd like to call a commmand cmd as follows: $ cmd --foo a --foo b --foo c cmdArg1 cmdArg2 There can be any number of arguments to the option --foo. When I try, the parser (GnuParser) considers the cmdArg1 and cmdArg2 arguments as arguments to the

[CLI] Command-line arguments and option with mulitple arguments

2011-05-24 Thread Gilles Sadowski
Hello. [With official release 1.2] I'd like to call a commmand cmd as follows: $ cmd --foo a --foo b --foo c cmdArg1 cmdArg2 There can be any number of arguments to the option --foo. When I try, the parser (GnuParser) considers the cmdArg1 and cmdArg2 arguments as arguments to the --foo

Re: [CLI] Command-line arguments and option with mulitple arguments

2011-05-24 Thread Gilles Sadowski
(); String[] address = props.getProperty(key).split(:); NodeInfo n = new NodeInfo(Integer.parseInt(key),address[0],Integer.parseInt(address[1])); cfg.addNode(n); } On Tue, May 24, 2011 at 2:13 PM, Gilles Sadowski gil...@harfang.homelinux.org wrote: Hello

Re: [CLI] Command-line arguments and option with mulitple arguments

2011-05-24 Thread Gilles Sadowski
[With official release 1.2] I'd like to call a commmand cmd as follows: $ cmd --foo a --foo b --foo c cmdArg1 cmdArg2 There can be any number of arguments to the option --foo. When I try, the parser (GnuParser) considers the cmdArg1 and cmdArg2 arguments as arguments to the --foo

Re: [CLI] Command-line arguments and option with mulitple arguments

2011-05-24 Thread Gilles Sadowski
= (String) keys.nextElement(); String[] address = props.getProperty(key).split(:); NodeInfo n = new NodeInfo(Integer.parseInt(key),address[0],Integer.parseInt(address[1])); cfg.addNode(n); } On Tue, May 24, 2011 at 2:13 PM, Gilles Sadowski

Re: [math] Do the two vectors in RealVector.outerProduct really have to be the same size?

2011-05-12 Thread Gilles Sadowski
Hello. thanks in advance for your time and apologies if this has been raised before (I searched and couldn't find it). I recently wrote something like RealMatrix M = x.outerProduct(y); and found it throwing an exception and failing one of my tests because x and y were

Re: [math] RealVectorImpl in userguide

2011-04-28 Thread Gilles Sadowski
Hello. In userguide http://commons.apache.org/math/userguide/linear.html I found in an example: RealVector constants = new RealVectorImpl(new double[] { 1, -2, 1 }, false); However I could not find RealVectorImpl in commons-math 2.2 but I found ArrayRealVector. Should I use

Re: [math] MullerSolver() empty constructor deprecated. Replacement?

2011-04-20 Thread Gilles Sadowski
Hello Nick. MullerSolver() and other Univariate solvers (NewtonSolver, SecantSolver) have had their no argument constructor deprecated. In the deprecation comment it says to be removed in 3.0. I can see no mention in the javadocs for commons-math 2.2 or 3.0 of any replacement mechanism for

Re: [math] MullerSolver() empty constructor deprecated. Replacement?

2011-04-20 Thread Gilles Sadowski
On Wed, Apr 20, 2011 at 11:46:32AM +0100, Nick Fortescue wrote: On 20 April 2011 11:45, Gilles Sadowski gil...@harfang.homelinux.org wrote: Hello Nick. MullerSolver() and other Univariate solvers (NewtonSolver, SecantSolver) have had their no argument constructor deprecated

Re: Fwd: Solver deprecations in common maths 2.2

2011-04-11 Thread Gilles Sadowski
Hi. On Mon, Apr 11, 2011 at 01:39:51AM -0700, Henri Yandell wrote: Noting that this didn't get a reply. I had not seen it pass. [Mails from commons are sometimes rejected by my provider under the (false) assumption that they are spam...] -- Forwarded message -- From: Olivier

Re: maximum number of iterations reached

2011-03-15 Thread Gilles Sadowski
Hi. [Please add a [Math] marker in the subject line of posts about the Commons Math project; this will raise the likelihood that the right people will notice your message.] On Tue, Mar 15, 2011 at 04:36:53PM +0800, Thomas Anderson wrote: When using NormalDistributionImpl calss, I encounter the

[Math] Re: maximum number of iterations reached

2011-03-15 Thread Gilles Sadowski
On Tue, Mar 15, 2011 at 11:38:55AM +0100, Gilles Sadowski wrote: Hi. [Please add a [Math] marker in the subject line of posts about the Commons Math project; this will raise the likelihood that the right people will notice your message.] Oops, I forgot to do it :-}. On Tue, Mar 15, 2011

[Math] Re: Levenberg Marquardt Simple Example

2011-01-29 Thread Gilles Sadowski
Hello. [Don't forget to write a [Math] marker in the subejct line of your mail.] Just wondering whether anyone knows of a simple example illustrating how to use the LevenbergMarquardt optimizer. When you check out the code from https://svn.apache.org/repos/asf/commons/proper/math/trunk

Re: [Math] BigDecimal to power

2011-01-21 Thread Gilles Sadowski
Hello. When proposing code, I think that you might get better attention by posting to the dev ML. I changed the license for my code and wrote some junit tests while refactoring. I think there are many improvements since I originally emailed. I have not had any off list expressions of

Re: [MATH] Sparse Matrix - visiting all entries

2010-08-17 Thread Gilles Sadowski
[...] Commons Math has a fairly strict back compatibility policy [...] s/fairly/very/ [...] that means that changes such as you want can take a very long time even for trunk. But now is a time of opportunity for incompatible changes, as work towards v3.0 has started! :-) Gilles

Re: [Math] Generate pseudo random number that obey a given distribution

2010-05-20 Thread Gilles Sadowski
Hi. I didn't for that in the doc, so maybe I'm asking the wrong question. Tell me if it's the case. I would like to generate random numbers that fits a given distribution. [...] Did you have a look at at the RandomData interface (and RandomDataImpl class)? It contains methods such

<    1   2