mathnet-numerics icon indicating copy to clipboard operation
mathnet-numerics copied to clipboard

Add Basin Hopping Global Optimization Algorithm with New Least Squares Interface

Open diluculo opened this issue 6 months ago • 1 comments

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 ILeastSquaresMinimizer interface
  • Defined two overloads of the FindMinimum method:
    • One accepting a Vector<double> parameter
    • One accepting a double[] parameter
  • Updated LevenbergMarquardtMinimizer and TrustRegionMinimizerBase to 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 ILeastSquaresMinimizer and IUnconstrainedMinimizer interfaces
  • Allows using any local minimizer for basin refinement:
    • For least squares problems: LevenbergMarquardtMinimizer, TrustRegionDogLegMinimizer, TrustRegionNewtonCGMinimizer
    • For unconstrained optimization: BfgsMinimizer, LimitedMemoryBfgsMinimizer, ConjugateGradientMinimizer, NewtonMinimizer

Note: This PR supersedes PR #1119 which only contained the interface portion of these changes.

diluculo avatar Apr 03 '25 02:04 diluculo