@@ -107,17 +107,17 @@ function run_r2n_svm!(model, x0; λ = 1.0, qn = :LBFGS, atol = 1e-3, rtol = 1e-3
107107 )
108108end
109109
110- function run_LM_svm! (nls_model, x0; λ = 1.0 , atol = 1e-3 , rtol = 1e-3 , verbose = 0 )
110+ function run_LM_svm! (nls_model, x0; λ = 1.0 , atol = 1e-3 , rtol = 1e-3 , verbose = 0 , sub_kwargs = (;) )
111111 reg_nls = RegularizedNLSModel (nls_model, RootNormLhalf (λ))
112112 solver = LMSolver (reg_nls)
113113 stats = RegularizedExecutionStats (reg_nls)
114114 RegularizedOptimization. solve! (solver, reg_nls, stats;
115- x = x0, atol = atol, rtol = rtol, verbose = verbose)
115+ x = x0, atol = atol, rtol = rtol, verbose = verbose, sub_kwargs = sub_kwargs )
116116 reset! (nls_model) # Reset counters before timing
117117 reg_nls = RegularizedNLSModel (nls_model, RootNormLhalf (λ))
118118 solver = LMSolver (reg_nls)
119119 t = @elapsed RegularizedOptimization. solve! (solver, reg_nls, stats;
120- x = x0, atol = atol, rtol = rtol, verbose = verbose)
120+ x = x0, atol = atol, rtol = rtol, verbose = verbose, sub_kwargs = sub_kwargs )
121121 return (
122122 name = " LM (SVM)" ,
123123 status = string (stats. status),
@@ -139,7 +139,7 @@ function bench_svm!(cfg = CFG)
139139 results = NamedTuple[]
140140 (:TR in cfg. RUN_SOLVERS) && push! (results, run_tr_svm! (model, x0; λ = cfg. LAMBDA_L0, qn = cfg. QN_FOR_TR, atol = cfg. TOL, rtol = cfg. RTOL, verbose = cfg. VERBOSE_RO, sub_kwargs = cfg. SUB_KWARGS_R2N))
141141 (:R2N in cfg. RUN_SOLVERS) && push! (results, run_r2n_svm! (model, x0; λ = cfg. LAMBDA_L0, qn = cfg. QN_FOR_R2N, atol = cfg. TOL, rtol = cfg. RTOL, verbose = cfg. VERBOSE_RO, sub_kwargs = cfg. SUB_KWARGS_R2N))
142- (:LM in cfg. RUN_SOLVERS) && push! (results, run_LM_svm! (nls_train, x0; λ = cfg. LAMBDA_L0, atol = cfg. TOL, rtol = cfg. RTOL, verbose = cfg. VERBOSE_RO))
142+ (:LM in cfg. RUN_SOLVERS) && push! (results, run_LM_svm! (nls_train, x0; λ = cfg. LAMBDA_L0, atol = cfg. TOL, rtol = cfg. RTOL, verbose = cfg. VERBOSE_RO, sub_kwargs = cfg . SUB_KWARGS_R2N ))
143143
144144 # Print quick summary
145145 println (" \n === SVM: solver comparison ===" )
0 commit comments