pablormier / yabox

Yet another black-box optimization library for Python
Apache License 2.0
136 stars 15 forks source link

Using scipy's DE genetic algorithm for initial parameter estimation in non-linear regression #1

Closed zunzun closed 7 years ago

zunzun commented 7 years ago

I see on github that you are writing optimization code using Differential Evolution for yabox. When using non-linear solvers such as Levenberg-Marquardt or gradient descent to optimize parameters for non-linear regression, there is a general problem of initial starting parameters. With poor initial parameter values to start the "descent" into error space, the algorithms can stop in a local error minimum. For this reason, the authors of scipy have added a (serial) implementation of DE for initial parameter estimation to use with scipy's non-linear solvers. The module is named scipy.optimize.differential_evolution. Scipy's implementation uses the Latin Hypercube algorithm to ensure a thorough search of parameter space.

I have used scipy's Differential Evolution genetic algorithm to determine initial parameters for fitting a double Lorentzian peak equation to Raman spectroscopy data of carbon nanotubes and found that the results were excellent. The GitHub project, with a test spectroscopy data file, is:

https://github.com/zunzun/RamanSpectroscopyFit

My background is in nuclear engineering and industrial radiation physics, and I love Python, so if you have any questions please let me know.

James Phillips

pablormier commented 7 years ago

Hi @zunzun,

Thanks for your comments. I'm planning to add a LHS initialization method in Yabox (v1.0.2).

Cheers

zunzun commented 7 years ago

It is kind of you to thank me, I do appreciate the professional courtesy.

James