Levenberg-Marquardt.NET

Download LMA.NET 3.5 (.NET 3.5)

The link above contains the full source code, including NUnit test files (+ VStudio 2008 project file) of the LMA.NET library. The lib directory contains latest version of NUnit framework 2.5.5 that is required for the compilation and running of the NUnit tests. The NANt build file compiles source files into the debug and release assemblies and then runs NUnit tests. The algorithm has been updated on 6/25/2010 - there was a defect due to low value of delta in the derivative fucntion 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

Full NDoc documentation is here