mathnet-numerics
mathnet-numerics copied to clipboard
Add Basin Hopping Global Optimization Algorithm with New Least Squares Interface
This PR adds both a new unified interface for least squares minimization and a Basin Hopping implementation for global optimization.
ILeastSquaresMinimizer Interface
First, this PR introduces a standardized interface for nonlinear least squares minimization algorithms:
- Added new
ILeastSquaresMinimizerinterface - Defined two overloads of the
FindMinimummethod:- One accepting a
Vector<double>parameter - One accepting a
double[]parameter
- One accepting a
- Updated
LevenbergMarquardtMinimizerandTrustRegionMinimizerBaseto implement this interface
Basin Hopping Implementation
Building on this interface, the PR adds a Basin Hopping algorithm for global optimization. Basin hopping is a stochastic algorithm that efficiently finds global minima in complex energy landscapes by combining random Monte Carlo steps with local optimization (Wikipedia).
Key features:
- Implements both
ILeastSquaresMinimizerandIUnconstrainedMinimizerinterfaces - Allows using any local minimizer for basin refinement:
- For least squares problems:
LevenbergMarquardtMinimizer,TrustRegionDogLegMinimizer,TrustRegionNewtonCGMinimizer - For unconstrained optimization:
BfgsMinimizer,LimitedMemoryBfgsMinimizer,ConjugateGradientMinimizer,NewtonMinimizer
- For least squares problems:
Note: This PR supersedes PR #1119 which only contained the interface portion of these changes.