Skip to content

Commit 08421c3

Browse files
committed
fix documentation
1 parent cb688bb commit 08421c3

File tree

1 file changed

+22
-4
lines changed

1 file changed

+22
-4
lines changed

src/Argmax2D/Argmax2D.jl

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ end
3636
"""
3737
$TYPEDSIGNATURES
3838
39-
Custom constructor for [`ArgmaxBenchmark`](@ref).
39+
Custom constructor for [`Argmax2DBenchmark`](@ref).
4040
"""
4141
function Argmax2DBenchmark(; nb_features::Int=5, seed=nothing, polytope_vertex_range=[6])
4242
Random.seed!(seed)
@@ -46,6 +46,11 @@ end
4646

4747
maximizer(θ; instance) = instance[argmax(dot(θ, v) for v in instance)]
4848

49+
"""
50+
$TYPEDSIGNATURES
51+
52+
Generate a dataset for the [`Argmax2DBenchmark`](@ref).
53+
"""
4954
function Utils.generate_dataset(
5055
bench::Argmax2DBenchmark, dataset_size=10; seed=nothing, rng=MersenneTwister(seed)
5156
)
@@ -60,8 +65,18 @@ function Utils.generate_dataset(
6065
end
6166
end
6267

68+
"""
69+
$TYPEDSIGNATURES
70+
71+
Maximizer for the [`Argmax2DBenchmark`](@ref).
72+
"""
6373
Utils.generate_maximizer(::Argmax2DBenchmark) = maximizer
6474

75+
"""
76+
$TYPEDSIGNATURES
77+
78+
Generate a statistical model for the [`Argmax2DBenchmark`](@ref).
79+
"""
6580
function Utils.generate_statistical_model(
6681
bench::Argmax2DBenchmark; seed=nothing, rng=MersenneTwister(seed)
6782
)
@@ -71,9 +86,12 @@ function Utils.generate_statistical_model(
7186
return model
7287
end
7388

74-
function Utils.plot_data(
75-
::Argmax2DBenchmark, sample::DataSample; θ_true=sample.θ_true, kwargs...
76-
)
89+
"""
90+
$TYPEDSIGNATURES
91+
92+
Plot the data sample for the [`Argmax2DBenchmark`](@ref).
93+
"""
94+
function Utils.plot_data(::Argmax2DBenchmark, sample::DataSample; kwargs...)
7795
(; instance) = sample
7896
pl = init_plot()
7997
plot_polytope!(pl, instance)

0 commit comments

Comments
 (0)