You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# And getting an individual sample will return a [`DataSample`](@ref) with four fields: `x`, `instance`, `θ`, and `y`:
24
+
# And getting an individual sample will return a [`DataSample`](@ref) with four fields: `x`, `info`, `θ`, and `y`:
25
25
sample = test_dataset[1]
26
26
# `x` correspond to the input features, i.e. the input image (3D array) in the Warcraft benchmark case:
27
27
x = sample.x
28
-
# `θ_true` correspond to the true unknown terrain weights. We use the opposite of the true weights in order to formulate the optimization problem as a maximization problem:
29
-
θ_true = sample.θ_true
30
-
# `y_true` correspond to the optimal shortest path, encoded as a binary matrix:
31
-
y_true = sample.y_true
32
-
# `instance` is not used in this benchmark, therefore set to nothing:
33
-
isnothing(sample.instance)
28
+
# `θ` correspond to the true unknown terrain weights. We use the opposite of the true weights in order to formulate the optimization problem as a maximization problem:
29
+
θ_true = sample.θ
30
+
# `y` correspond to the optimal shortest path, encoded as a binary matrix:
31
+
y_true = sample.y
32
+
# `info` is not used in this benchmark, therefore set to nothing:
33
+
isnothing(sample.info)
34
34
35
35
# For some benchmarks, we provide the following plotting method [`plot_data`](@ref) to visualize the data:
# In the case o fthe Warcraft benchmark, the method has an additional keyword argument to chose the algorithm to use: Dijkstra's algorithm or Bellman-Ford algorithm.
51
51
y =maximizer(θ)
52
52
# As we can see, currently the pipeline predicts random noise as cell weights, and therefore the maximizer returns a straight line path.
53
-
plot_data(b, DataSample(; x, θ_true=θ, y_true=y))
53
+
plot_data(b, DataSample(; x, θ, y))
54
54
# We can evaluate the current pipeline performance using the optimality gap metric:
0 commit comments