Skip to content

Commit d3e0c9a

Browse files
Refactor benchmark files by removing unused includes and updating nonsmooth term initialization
1 parent 8e2aae4 commit d3e0c9a

File tree

3 files changed

+2
-13
lines changed

3 files changed

+2
-13
lines changed

paper/examples/Benchmark.jl

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@ using LaTeXStrings
1616
include("comparison-config.jl")
1717
using .ComparisonConfig: CFG, CFG2
1818

19-
include("Bench-utils.jl")
20-
using .BenchUtils
21-
2219
#############################
2320
# ===== Helper utils ====== #
2421
#############################
@@ -39,14 +36,6 @@ function ensure_qn(model, which::Symbol)
3936
error("Unknown QN: $which (expected :LBFGS or :LSR1)")
4037
end
4138

42-
# Close a PrettyTables Markdown string by adding a bottom rule
43-
function close_markdown_table(table_str::AbstractString)
44-
lines = split(String(table_str), '\n')
45-
isempty(lines) && return table_str
46-
sep = length(lines) >= 2 ? lines[2] : repeat("-", 10)
47-
push!(lines, sep)
48-
return join(lines, '\n')
49-
end
5039

5140
#############################
5241
# ======= SVM bench ======= #

paper/examples/example1.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Random.seed!(1234)
66
model, nls_model, _ = RegularizedProblems.svm_train_model() # Build SVM model
77
f = LSR1Model(model) # L-SR1 Hessian approximation
88
λ = 1.0 # Regularization parameter
9-
h = RootNormLhalf(1.0) # Nonsmooth term
9+
h = RootNormLhalf(λ) # Nonsmooth term
1010
reg_nlp = RegularizedNLPModel(f, h) # Regularized problem
1111
solver = R2NSolver(reg_nlp) # Choose solver
1212
stats = RegularizedExecutionStats(reg_nlp)

paper/paper.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ Random.seed!(1234)
144144
model, nls_model, _ = RegularizedProblems.svm_train_model() # Build SVM model
145145
f = LSR1Model(model) # L-SR1 Hessian approximation
146146
λ = 1.0 # Regularization parameter
147-
h = RootNormLhalf(1.0) # Nonsmooth term
147+
h = RootNormLhalf(λ) # Nonsmooth term
148148
reg_nlp = RegularizedNLPModel(f, h) # Regularized problem
149149
solver = R2NSolver(reg_nlp) # Choose solver
150150
stats = RegularizedExecutionStats(reg_nlp)

0 commit comments

Comments
 (0)