From aee20d69f9206eb47a4b1432783e0686b771f66c Mon Sep 17 00:00:00 2001 From: Guillaume Dalle <22795598+gdalle@users.noreply.github.com> Date: Thu, 29 Feb 2024 15:16:49 +0100 Subject: [PATCH] Fix formatting --- .gitignore | 3 ++- libs/HMMComparison/README.md | 10 ++++++++++ libs/HMMComparison/experiments/plots.jl | 12 ++++++------ 3 files changed, 18 insertions(+), 7 deletions(-) create mode 100644 libs/HMMComparison/README.md diff --git a/.gitignore b/.gitignore index 954eac3b..b3193119 100644 --- a/.gitignore +++ b/.gitignore @@ -23,4 +23,5 @@ scratchpad.jl /docs/src/index.md /docs/src/examples/*.md -*.pdf \ No newline at end of file +*.pdf +*.svg \ No newline at end of file diff --git a/libs/HMMComparison/README.md b/libs/HMMComparison/README.md new file mode 100644 index 00000000..603be236 --- /dev/null +++ b/libs/HMMComparison/README.md @@ -0,0 +1,10 @@ +# HMMComparison + +To re-run the experiments from the JOSS paper, clone the repository, start a Julia REPL and run + +```julia +include("libs/HMMComparison/experiments/measurements.jl") +include("libs/HMMComparison/experiments/plots.jl") +``` + +The results and plots will appear in `libs/HMMComparison/experiments/results/`. diff --git a/libs/HMMComparison/experiments/plots.jl b/libs/HMMComparison/experiments/plots.jl index cd2f91d6..8f083c40 100644 --- a/libs/HMMComparison/experiments/plots.jl +++ b/libs/HMMComparison/experiments/plots.jl @@ -18,7 +18,7 @@ algos = ["viterbi", "forward", "forward_backward", "baum_welch"] markers = [:star5, :circle, :diamond, :hexagon, :pentagon] linestyles = [nothing, :dot, :dash, :dashdot, :dashdotdot] -fig = Figure(size=(900, 700)) +fig = Figure(; size=(900, 700)) ax = nothing for (k, algo) in enumerate(algos) ax = Axis( @@ -28,9 +28,9 @@ for (k, algo) in enumerate(algos) ylabel="runtime (s)", yscale=log10, xticks=unique(data[!, :nb_states]), - yminorticksvisible = true, - yminorgridvisible = true, - yminorticks = IntervalsBetween(5) + yminorticksvisible=true, + yminorgridvisible=true, + yminorticks=IntervalsBetween(5), ) for (i, implem) in enumerate(implems) @@ -47,6 +47,6 @@ for (k, algo) in enumerate(algos) ) end end -Legend(fig[3, 1:2], ax, orientation = :horizontal) +Legend(fig[3, 1:2], ax; orientation=:horizontal) fig -save(joinpath(@__DIR__, "results", "benchmark.pdf"), fig) +save(joinpath(@__DIR__, "results", "benchmark.svg"), fig)