How to use ml-levenberg-marquardt - 1 common examples

To help you get started, we’ve selected a few ml-levenberg-marquardt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PAIR-code / umap-js / src / umap.ts View on Github external
return gte ? Math.exp(-(xv[index] - minDist) / spread) : val;
  });

  const initialValues = [0.5, 0.5];
  const data = { x: xv, y: yv };

  // Default options for the algorithm (from github example)
  const options = {
    damping: 1.5,
    initialValues,
    gradientDifference: 10e-2,
    maxIterations: 100,
    errorTolerance: 10e-3,
  };

  const { parameterValues } = LM(data, curve, options);
  const [a, b] = parameterValues as number[];
  return { a, b };
}

ml-levenberg-marquardt

Curve fitting method in javascript

MIT
Latest version published 7 months ago

Package Health Score

67 / 100
Full package analysis

Popular ml-levenberg-marquardt functions