@@ -125,13 +125,13 @@ function Utils.generate_dataset(
125125 [rand (rng, Uniform {type} (1 - ν, 1 + ν), E) for _ in 1 : dataset_size]
126126 end
127127 costs = [
128- (1 .+ (3 .+ B * zᵢ ./ type (sqrt (p))) .^ deg) .* ξᵢ for (ξᵢ, zᵢ) in zip (ξ, features)
128+ - (1 .+ (3 .+ B * zᵢ ./ type (sqrt (p))) .^ deg) .* ξᵢ for (ξᵢ, zᵢ) in zip (ξ, features)
129129 ]
130130
131131 shortest_path_maximizer = Utils. generate_maximizer (bench)
132132
133133 # Label solutions
134- solutions = shortest_path_maximizer .(.- costs)
134+ solutions = shortest_path_maximizer .(costs)
135135 return [DataSample (; x= x, θ= θ, y= y) for (x, θ, y) in zip (features, costs, solutions)]
136136end
137137
@@ -145,23 +145,6 @@ function Utils.generate_statistical_model(bench::FixedSizeShortestPathBenchmark)
145145 return Chain (Dense (p, ne (graph)))
146146end
147147
148- function objective_value (:: FixedSizeShortestPathBenchmark , θ, y)
149- return dot (θ, y)
150- end
151-
152- function Utils. compute_gap (
153- bench:: FixedSizeShortestPathBenchmark , model, features, costs, solutions, maximizer
154- )
155- res = 0.0
156- for (x, ȳ, θ̄) in zip (features, solutions, costs)
157- θ = model (x)
158- y = maximizer (θ)
159- val = objective_value (bench, θ̄, ȳ)
160- res += (objective_value (bench, θ̄, y) - val) / val
161- end
162- return res / length (features)
163- end
164-
165148export FixedSizeShortestPathBenchmark
166149
167150end
0 commit comments