Skip to content

Instantly share code, notes, and snippets.

View micampbell's full-sized avatar

Matt Campbell micampbell

View GitHub Profile
@micampbell
micampbell / Levenberg-Marquadt-Optimization.cs
Last active May 29, 2022 22:18
The Levenberg-Marquadt Optimization can be used in many ways. It is often used to fit data where the objective function is the squared difference between predicted value and each data point.
using System;
using System.Linq;
using System.Runtime.CompilerServices;
namespace LMOpt
{
/// <summary>
/// Class Levenberg-Marquadt Optimization. This class includes functions to run this optimization method.
/// It is an abstract class, so you must inherit it in A new class. That new class must have the following:
/// 1. A constructor that calls the base constructor