Skip to content

Commit 8b527f4

Browse files
authored
docs(benchmarkprofiles): add detailed explanations of parameters and interpretation (fixes #35) (#151)
- Explain what τ (performance ratio) and ρ (fraction solved) represent - Add key interpretation guidelines for reading performance profiles - Document customization options (lw, color, linestyles, etc.) - List additional parameters (logscale, sampletol, title) - Add reference to Dolan & Moré 2002 paper - Improve tutorial structure with clearer sections
1 parent aa27d1c commit 8b527f4

File tree

1 file changed

+35
-2
lines changed
  • tutorials/introduction-to-benchmarkprofiles

1 file changed

+35
-2
lines changed

tutorials/introduction-to-benchmarkprofiles/index.jmd

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,24 @@ tags: ["benchmarking"]
44
author: "Abel Soares Siqueira and Dominique Orban"
55
---
66

7-
This tutorial is essentially a collection of examples.
7+
This tutorial demonstrates how to use BenchmarkProfiles.jl to visualize and compare solver performance across multiple test problems.
88

99
## Performance Profile
1010

11-
Performance profiles are straightforward to use. The input is a matrix `T` with entries `T[i,j]` indicating the cost to solve problem `i` using solver `j`. Cost can be, for instance, elapsed time, or number of evaluations. The cost should be positive. If any cost is zero, all measures will be shifted by 1.
11+
Performance profiles, introduced by Dolan and Moré (2002), provide a graphical way to compare the performance of multiple solvers across a test set. They show the fraction of problems solved by each solver as a function of a performance tolerance.
12+
13+
### Understanding Performance Profiles
14+
15+
The input is a matrix `T` with entries `T[i,j]` indicating the cost to solve problem `i` using solver `j`. Cost can be, for instance, elapsed time, number of iterations, or function evaluations. The cost should be positive. If any cost is zero, all measures will be shifted by 1.
16+
17+
The performance profile plots:
18+
- **x-axis (τ)**: Performance ratio - how much slower a solver is compared to the best solver for each problem. τ=1 means the solver was fastest, τ=2 means it took twice as long as the fastest solver.
19+
- **y-axis (ρ(τ))**: Fraction of problems solved within the performance ratio τ. ρ(2) = 0.8 means the solver solved 80% of problems within twice the time of the best solver.
20+
21+
**Key interpretations**:
22+
- The height at τ=1 (left side) shows the fraction of problems where the solver was fastest
23+
- The right-side height (as τ→∞) shows the fraction of problems successfully solved (robustness)
24+
- Higher curves are better - the solver solves more problems with smaller performance ratios
1225

1326
Basic usage:
1427

@@ -35,9 +48,19 @@ T[:,2] = 100T[:,3]
3548
performance_profile(PlotsBackend(), T, ["Solver 1", "Solver 2", "Solver 3"])
3649
```
3750

51+
### Customization Options
52+
3853
`Plots` arguments can be passed to `performance_profile()` or used as they normally would be with `Plots`.
3954
In the example below, we pass `xlabel` to `performance_profile` and set `ylabel` through `ylabel!`.
4055

56+
Common customization options:
57+
- `lw`: Line width
58+
- `c` or `color`: Line colors
59+
- `linestyles`: Line styles (`:solid`, `:dash`, `:dot`, etc.)
60+
- `xlabel`, `ylabel`: Axis labels
61+
- `title`: Plot title
62+
- `legend`: Legend position (e.g., `:bottomright`, `:topleft`)
63+
4164
```julia
4265
using Plots
4366

@@ -46,3 +69,13 @@ performance_profile(PlotsBackend(), T, ["Solver 1", "Solver 2", "Solver 3"],
4669
lw=2, c=:black, linestyles=[:solid, :dash, :dot], xlabel="τ")
4770
ylabel!("ρ(τ)")
4871
```
72+
73+
### Additional Parameters
74+
75+
The `performance_profile` function accepts several optional keyword arguments:
76+
77+
- `logscale::Bool=true`: Use logarithmic scale on the x-axis (default: true). Useful for viewing performance across a wide range of ratios.
78+
- `sampletol::Number=0`: Tolerance for sampling data points. Can reduce plot complexity for large datasets.
79+
- `title::String=""`: Title for the plot
80+
81+
For more details on performance profiles, see: Dolan, E. D., & Moré, J. J. (2002). Benchmarking optimization software with performance profiles. Mathematical Programming, 91(2), 201-213.

0 commit comments

Comments
 (0)