# commons-user mailing list archives

##### Site index · List index
Message view
Top
Subject Re: [math] Optimize non-differentiable multivariate real function with initial guess
Date Wed, 08 Aug 2012 12:37:49 GMT
```Luc, Gilles, thank you for your quick answers !

I'll try to begin with the PowellOptimizer.
I haven't found documentation i could understand
The rel & abs thresholds.

test.java.org.apache.commons.math3.optimization.direct.PowellOptimizerTest.doTest(MultivariateFunction,double[],double[],GoalType,double,double

pointTol)

Regards,

> Hello.
>
>>
>> >
>> > i'm implementing in java a model which was originally developped
>> in Matlab.
>> >
>> > The goal is to minimize a non-differentiable trivariate real function.
>> > The Matlab code calls the fminunc function
>> > x = fminunc(fun,x0,options)
>> > with x0 = [a, b, c] the initial guess, and
>> > options as 'MaxFunEvals' to 500
>> >
>> > I don't think the function is differentiable.
>> > But i'm not very skilled in math
>> > and mainly not at ease with the different parameters required for
>> > optimizers creation...
>> >
>>
>> Look at either NelderMeadSimplex, MultiDimensionalSimplex or
>> CMAESOptimizer in the org.apache.commons.math3.optimization.direct package.
>
> The easiest would be to start with "PowellOptimizer" (in the same package).
>
> Code would be like:
> ---CUT---
>     MultivariateOptimizer optim = new PowellOptimizer();
>     MultivariateFunction f = ... your function ...
>
>     PointValuePair result = optim.optimize(500, f, GoalType.MINIMIZE,
>                                            new double[] { a, b, c});
>     double[] minimum = result.getPoint();
> ---CUT---
>
>
> Regards,
> Gilles
>
> ---------------------------------------------------------------------
> 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