1
$\begingroup$

I am trying to migrate Matlab (Octave) Levenberg-Marquardt algorithm to Accord.Net (C#) but struggling to match input parameters

For example this simple example available in the documentation here: https://octave.sourceforge.io/optim/function/leasqr.html

  %% model function:
  F = @ (x, p) p(1) * exp (p(2) * x);
  %% independents and dependents:
  x = 1:5;
  y = [1, 2, 4, 7, 14];
  %% initial values:
  init = [.25; .25];
  %% other configuration (default values):
  tolerance = .0001;
  max_iterations = 20;
  weights = ones (1, 5);
  dp = [.001; .001]; % bidirectional numeric gradient stepsize
  dFdp = "dfdp"; % function for gradient (numerical)

  %% linear constraints, A.' * parametervector + B >= 0
  A = [1; -1]; B = 0; % p(1) >= p(2);
  options.inequc = {A, B};

  %% start leasqr, be sure that 'verbose' is not set
  global verbose; verbose = false;
  [f, p, cvg, iter] = ...
      leasqr (x, y, init, F, tolerance, max_iterations, ...
          weights, dp, dFdp, options)

I am trying to move it to Accord.Net

http://accord-framework.net/docs/html/T_Accord_Neuro_Learning_LevenbergMarquardtLearning.htm

Could anybody help or at least advise how to approach the issue?

Many thanks

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.