nonlinear least square

D

Dmitry Rozmanov

Hi.

I am looking for simple and convenient way to do nonlinear least square
fit from within Python.

I know that there are such a modules in Scientific Python and SciPy has
it. But I would like to have it small and simple. Module with just this
functionality. It can be not very fast, but in pure python for beter
compatibility.

Can you recommend such a module?

Thank you in advance.

Regards.

---Dmitry.
 
J

John J. Lee

Dmitry Rozmanov said:
I am looking for simple and convenient way to do nonlinear least
square fit from within Python.

I know that there are such a modules in Scientific Python and SciPy
has it. But I would like to have it small and simple. Module with just
this functionality. It can be not very fast, but in pure python for
beter compatibility.
[...]

Konrad Hinsen's implementation in Scientific Python *is* in pure
Python, and as a consequence is probably about as simple as you're
going to get, I imagine. Is it dependencies on Scientific Python that
you don't like? If so, just dive in and remove them, if it's that
important to you -- I doubt you'll find a better pure Python
implementation.

I can certainly testify that SciPy's MINPACK wrapper works fine, too.
I can dig out some example code if you like.


John
 
D

Dmitry Rozmanov

John J. Lee wrote:

Thank you for the suggestion.

Yes, I do not like to have to install Scientific Python just for this
purpose. As I understand it has some modules which have to be compiled
anyway.

I would be really grateful for any example code you provide.

BWT do you know such a standalone code for nonlinear equations set
solving? Newton's method or something. I mean in Python only.

Thank you again.

Regards.

---Dmitry.
 
W

William Park

Dmitry Rozmanov said:
John J. Lee wrote:

Thank you for the suggestion.

Yes, I do not like to have to install Scientific Python just for this
purpose. As I understand it has some modules which have to be compiled
anyway.

I would be really grateful for any example code you provide.

BWT do you know such a standalone code for nonlinear equations set
solving? Newton's method or something. I mean in Python only.

Efficiency aside, it's easy to write them in Python. You can
practically copy C-code line for line. Or, write algorithm from books.
 
C

Chris Friedl

I recently found the Enthought python packages (2.2 & 2.3) which bundles a
whole lot of scientific/numeric/visualisation python code (see
www.enthought.com/python). Might be useful for you to get to the scipy
stuff.

Merry Xmas
 
D

Dmitry Rozmanov

Thank you for the link. It is of use for windows installation definitely.

Regards.

---Dmitry.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,173
Messages
2,570,937
Members
47,481
Latest member
ElviraDoug

Latest Threads

Top