ZeroGuess Benchmark (lmfit for double_gaussian function)

How This Benchmark Works

This benchmark evaluates different parameter estimation and curve fitting approaches using synthetic data with known ground truth values.

Methodology:

  1. Test Data Generation: 50 different parameter sets are randomly generated for the double_gaussian function. For each parameter set, synthetic data is created with 5% noise added.
  2. Methods Compared:
    • Simple + lmfit: Uses central values from parameter ranges as starting points
    • ZeroGuess + lmfit: Uses ZeroGuess's neural network to estimate starting parameters
    • True + lmfit: Uses the true parameters as starting points (best case scenario)
    Each method is tested with different optimization algorithms (least_squares, dual_annealing)
  3. Metrics:
    • Fit Success: Whether the fitting algorithm converged
    • Parameter Success: Whether all recovered parameters are within 10% of true values
    • Computation Time: Time for parameter estimation and fitting
    • Function Evaluations: Number of function calls required

Summary for double_gaussian function

Success and Performance Metrics

Method Fit Success Parameter Success Estimation Time (s) Fitting Time (s) Function Evaluations
Simple + lmfit (least_squares) 100.0% 42.0% 0.0005 0.0219 185.5
True + lmfit (dual_annealing) 100.0% 64.0% 0.0005 1.1768 12445.6
ZeroGuess + lmfit (dual_annealing) 100.0% 68.0% 0.0012 1.1652 12437.4
ZeroGuess + lmfit (least_squares) 100.0% 70.0% 0.0012 0.0111 84.2
Simple + lmfit (dual_annealing) 100.0% 72.0% 0.0005 1.1718 12404.3
True + lmfit (least_squares) 100.0% 72.0% 0.0005 0.0071 46.3

Parameter Error Summary

Method amplitude1center1width1amplitude2center2width2
Simple + lmfit (least_squares) 29.2%17.5%15.1%166.2%40.2%27.4%
True + lmfit (dual_annealing) 16.7%20.6%18.7%40.3%66.0%7.1%
ZeroGuess + lmfit (dual_annealing) 14.6%8.6%4.6%31.3%14.3%6.0%
ZeroGuess + lmfit (least_squares) 9.8%10.0%5.6%113.2%8.8%5.4%
Simple + lmfit (dual_annealing) 12.3%10.6%4.4%15.1%56.9%4.6%
True + lmfit (least_squares) 6.5%4.6%1.6%6.9%6.2%2.3%

Visualization

Summary Chart

Sample Fits

Simple + lmfit (least_squares)

Links to all fits: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50]
Simple + lmfit (least_squares) - Set 1
Simple + lmfit (least_squares) - Set 2
Simple + lmfit (least_squares) - Set 3

ZeroGuess + lmfit (least_squares)

Links to all fits: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50]
ZeroGuess + lmfit (least_squares) - Set 1
ZeroGuess + lmfit (least_squares) - Set 2
ZeroGuess + lmfit (least_squares) - Set 3

True + lmfit (least_squares)

Links to all fits: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50]
True + lmfit (least_squares) - Set 1
True + lmfit (least_squares) - Set 2
True + lmfit (least_squares) - Set 3

Simple + lmfit (dual_annealing)

Links to all fits: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50]
Simple + lmfit (dual_annealing) - Set 1
Simple + lmfit (dual_annealing) - Set 2
Simple + lmfit (dual_annealing) - Set 3

ZeroGuess + lmfit (dual_annealing)

Links to all fits: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50]
ZeroGuess + lmfit (dual_annealing) - Set 1
ZeroGuess + lmfit (dual_annealing) - Set 2
ZeroGuess + lmfit (dual_annealing) - Set 3

True + lmfit (dual_annealing)

Links to all fits: [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] [50]
True + lmfit (dual_annealing) - Set 1
True + lmfit (dual_annealing) - Set 2
True + lmfit (dual_annealing) - Set 3