Levenberg-Marquardt.NET
Download LMA.NET (.NET 6.0 / Nunit 3.0)
The link above contains the full source code, including NUnit test files and VStudio 2013 solution of the LMA.NET library. The algorithm has been updated on 6/25/2010 - there was a defect due to low value of delta in the derivative function that sometimes caused singularities. The new value of delta is 1*10-9 which seems to work now.
Public constructor: public LMA(LMAFunction function, double[] parameters, double[][] dataPoints, double[] weights, GeneralMatrix alpha, double argDeltaChi2, int argMaxIter)
- function: function to fit the experimental data. Inherits from the LMA Function
- parameters: vector with initital parameters
- dataPoints: array containing experimental data that will be used in the fit
- weights: array of doubles with weights to experimental points
- Alpha: matrix
- epsilon: accuracy of the final result
- itMax: max number of iteration
function to call to execute minimum search: public void Fit()
Mimium is stored in the Parameters property of the object