This Python repo is for a comparison orcale based optimization algorithm introduced in [1], which is coined Sparsity-aware Comparison-Based Optimization (SCOBO).
[1] HanQin Cai, Daniel Mckenzie, Wotao Yin, and Zhenliang Zhang. A One-bit, Comparison-Based Gradient Estimator. Applied and Computational Harmonic Analysis, 60: 242-266, 2022.
To display math symbols properly, one may have to install a MathJax plugin. For example, MathJax Plugin for Github.
We aim to minimize an objective function
x, regret, tau_vec , c_num_queries = SCOBO(comparison, obj_fcn, num_iterations, default_step_size, x0, r, m, d, s, fixed_flip_rate, line_search, warm_started)
- comparison : handle of the comparison orcale
- object_fcn : objective function, this is for recording regret only. not used for solving problem
- num_iterations : number of iterations
- default_step_size : default step size
- x0 : initial iterate
- r : sampling radius
- m : number of samples per iteration
- d : dimension of problem
- s : sparsity level
- fixed_flip_rate : ture if kappa==1, i.e., comparison orcale's flip rate is independent to |f(x)-f(y)|; otherwise false
- line_search : wheather linesearch for step size. if not, use default step size
- warm_started : wheather use warm start in linesearch
- x : estimated optimum point
- regret : vector of errors f(x_k) - min f
- tau_vec : tau_vec(k) = fraction of flipped measurements at k-th iteration
- c_num_queries : cumulative number of queries.
Run test_sobo.py
for demo. Therein, we include four test problems. More details about the test problems can be found in the paper.