We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4cbcbc2 commit 44afabeCopy full SHA for 44afabe
1 file changed
src/Utils/interface.jl
@@ -137,7 +137,8 @@ function compute_gap(
137
bench::AbstractBenchmark,
138
dataset::AbstractVector{<:DataSample},
139
statistical_model,
140
- maximizer,
+ maximizer;
141
+ percentage::Bool=false,
142
)
143
res = 0.0
144
check = is_minimization_problem(bench)
@@ -151,5 +152,6 @@ function compute_gap(
151
152
Δ = check ? obj - target_obj : target_obj - obj
153
res += Δ / abs(target_obj)
154
end
- return res / length(dataset)
155
+ gap = res / length(dataset)
156
+ return percentage ? gap * 100 : gap
157
0 commit comments