Ask Your Question
0

Solver for multiple variable

asked 2015-04-21 21:06:22 +0200

marraco gravatar image

I have a function which depends of multiple parameters, and I need to find the parameters that minimize some error function.

Is non linear, but works well with conjugate gradient and central derivative methods on other software, which just do not have the necessary precision.

Is there something similar in PariGP?

The "solver" function seems to work only with one parameter.

Please, do not ask for more specific details about the function. This is a general question.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-04-22 19:38:24 +0200

calc314 gravatar image

updated 2015-04-22 20:43:08 +0200

You can use scipyfor this. See https://docs.scipy.org/doc/scipy/refe....

Here is an outline of some code.

from scipy import optimize

def err(params,F):
    ...
    return result

optimize.minimize(err,[initial values],args=(...))
edit flag offensive delete link more

Comments

Thanks!

I was told that it is not possible in PariGP, so I gave up, and just today I found your answer.

Hope it works.

marraco gravatar imagemarraco ( 2015-05-11 12:42:27 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-04-21 21:06:22 +0200

Seen: 401 times

Last updated: Apr 22 '15