Skip to content

Commit cb688bb

Browse files
committed
update doc
1 parent c379866 commit cb688bb

File tree

2 files changed

+24
-9
lines changed

2 files changed

+24
-9
lines changed

docs/src/api/argmax_2d.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Argmax2D
2+
3+
## Public
4+
5+
```@autodocs
6+
Modules = [DecisionFocusedLearningBenchmarks.Argmax2D]
7+
Private = false
8+
```
9+
10+
## Private
11+
12+
```@autodocs
13+
Modules = [DecisionFocusedLearningBenchmarks.Argmax2D]
14+
Public = false
15+
```

test/argmax_2d.jl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,19 @@
1515
for (i, sample) in enumerate(dataset)
1616
(; x, θ_true, y_true, instance) = sample
1717
@test length(x) == nb_features
18-
@test length(θ_true) == 2 # 2D vectors
19-
@test length(y_true) == 2 # 2D point
20-
@test !isnothing(sample.instance) # instance is a polytope
21-
@test instance isa Vector{Vector{Float64}} # polytope is vector of 2D points
22-
@test all(length(vertex) == 2 for vertex in instance) # all vertices are 2D
23-
@test y_true in instance # solution should be a vertex of the polytope
18+
@test length(θ_true) == 2
19+
@test length(y_true) == 2
20+
@test !isnothing(sample.instance)
21+
@test instance isa Vector{Vector{Float64}}
22+
@test all(length(vertex) == 2 for vertex in instance)
23+
@test y_true in instance
2424
@test y_true == maximizer(θ_true; instance=instance)
2525

2626
θ = model(x)
27-
@test length(θ) == 2 # 2D vector
27+
@test length(θ) == 2
2828

2929
y = maximizer(θ; instance=instance)
30-
@test length(y) == 2 # 2D point
31-
@test y in instance # solution should be a vertex of the polytope
30+
@test length(y) == 2
31+
@test y in instance
3232
end
3333
end

0 commit comments

Comments
 (0)