Skip to content

Commit 92427d2

Browse files
committed
Cleanup readme and documentation pages
1 parent 4060caf commit 92427d2

File tree

8 files changed

+46
-23
lines changed

8 files changed

+46
-23
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
1313
## What is Decision-Focused Learning?
1414

15-
Decision-focused learning (DFL) is a paradigm that integrates machine learning prediction with combinatorial optimization to make better decisions under uncertainty. Unlike traditional "predict-then-optimize" approaches that optimize prediction accuracy independently of downstream decision quality, DFL directly optimizes end-to-end decision performance.
15+
Decision-Focused Learning (DFL) is a paradigm that integrates machine learning prediction with combinatorial optimization to make better decisions under uncertainty.
16+
Unlike traditional "predict-then-optimize" approaches that optimize prediction accuracy independently of downstream decision quality, DFL directly optimizes end-to-end decision performance.
1617

1718
A typical DFL algorithm involves training a parametrized policy that combines a statistical predictor with an optimization component:
1819

@@ -23,19 +24,19 @@ x \;\longrightarrow\; \boxed{\,\text{Statistical model } \varphi_w\,}
2324
```
2425

2526
Where:
26-
- **Instance** $x$: input data (e.g., features, context)
2727
- **Statistical model** $\varphi_w$: machine learning predictor (e.g., neural network)
28-
- **Parameters** $\theta$: predicted parameters for the optimization problem
2928
- **CO algorithm** $f$: combinatorial optimization solver
30-
- **Solution** $y$: final decision/solution
29+
- **Instance** $x$: input data (e.g., features, context)
30+
- **Parameters** $\theta$: predicted parameters for the optimization problem solved by `f`
31+
- **Solution** $y$: output decision/solution
3132

3233
## Package Overview
3334

3435
**DecisionFocusedLearningBenchmarks.jl** provides a comprehensive collection of benchmark problems for evaluating decision-focused learning algorithms. The package offers:
3536

3637
- **Standardized benchmark problems** spanning diverse application domains
37-
- **Common interfaces** for datasets, statistical models, and optimization components
38-
- **Ready-to-use pipelines** compatible with [InferOpt.jl](https://github.com/JuliaDecisionFocusedLearning/InferOpt.jl) and the whole [JuliaDecisionFocusedLearning](https://github.com/JuliaDecisionFocusedLearning) ecosystem
38+
- **Common interfaces** for creating datasets, statistical models, and optimization algorithms
39+
- **Ready-to-use DFL policies** compatible with [InferOpt.jl](https://github.com/JuliaDecisionFocusedLearning/InferOpt.jl) and the whole [JuliaDecisionFocusedLearning](https://github.com/JuliaDecisionFocusedLearning) ecosystem
3940
- **Evaluation tools** for comparing algorithm performance
4041

4142
## Benchmark Categories
@@ -53,13 +54,13 @@ Single-stage optimization problems with no randomness involved:
5354
- [`WarcraftBenchmark`](@ref): shortest path on image maps
5455

5556
### Stochastic Benchmarks (`AbstractStochasticBenchmark`)
56-
Single-stage problems with random noise affecting the objective:
57+
Single-stage optimization problems under uncertainty:
5758
- [`StochasticVehicleSchedulingBenchmark`](@ref): stochastic vehicle scheduling under delay uncertainty
5859

5960
### Dynamic Benchmarks (`AbstractDynamicBenchmark`)
6061
Multi-stage sequential decision-making problems:
6162
- [`DynamicVehicleSchedulingBenchmark`](@ref): multi-stage vehicle scheduling under customer uncertainty
62-
- [`DynamicAssortmentBenchmark`](@ref): sequential product assortment selection
63+
- [`DynamicAssortmentBenchmark`](@ref): sequential product assortment selection with endogenous uncertainty
6364

6465
## Getting Started
6566

@@ -85,6 +86,8 @@ maximizer = generate_maximizer(benchmark)
8586
gap = compute_gap(benchmark, dataset, model, maximizer)
8687
```
8788

89+
The only component you need to customize is the training algorithm itself.
90+
8891
## Related Packages
8992

9093
This package is part of the [JuliaDecisionFocusedLearning](https://github.com/JuliaDecisionFocusedLearning) organization, and built to be compatible with other packages in the ecosystem:

docs/src/benchmark_interfaces.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Understanding Benchmark Interface
22

3-
This guide explains how benchmarks work through common interfaces in DecisionFocusedLearningBenchmarks.jl.
3+
This guide explains how benchmarks work through the common interface of DecisionFocusedLearningBenchmarks.jl.
44
Understanding this interface is essential for using existing benchmarks and implementing new ones.
55

66
## Core Concepts
@@ -46,9 +46,9 @@ Every benchmark must implement a data generation method:
4646
# Generate a single sample
4747
generate_sample(benchmark::AbstractBenchmark, rng::AbstractRNG; kwargs...) -> DataSample
4848
```
49-
This method should generate a single `DataSample` given a random number generator and optional parameters.
49+
This method should output a single `DataSample` given a random number generator and optional parameters as keyword arguments.
5050

51-
If needed, benchmarks can instead override the [`generate_dataset`](@ref) method to directly create the entire dataset:
51+
If needed, benchmarks can instead override the [`generate_dataset`](@ref) method to directly create an entire dataset of size `size`:
5252
```julia
5353
generate_dataset(benchmark::AbstractBenchmark, size::Int; kwargs...) -> Vector{DataSample}
5454
```
@@ -67,7 +67,7 @@ generate_statistical_model(benchmark::AbstractBenchmark; kwargs...)
6767
generate_maximizer(benchmark::AbstractBenchmark; kwargs...)
6868
```
6969

70-
The statistical model typically maps from features `x` to cost parameters `θ`.
70+
The statistical model typically maps features `x` to cost parameters `θ`.
7171
The maximizer solves optimization problems given cost parameters `θ` (and potentially additional problem dependent keyword arguments), returning decision `y`.
7272

7373
### Benchmark Policies
@@ -78,15 +78,15 @@ Benchmarks can provide baseline policies for comparison and evaluation:
7878
# Get baseline policies for comparison
7979
generate_policies(benchmark::AbstractBenchmark) -> Tuple{Policy}
8080
```
81-
This returns a tuple of `Policy` objects representing different benchmark-specific policies:
81+
This returns a tuple of `Policy` objects representing different benchmark-specific policies.
82+
A `Policy` is just a function with a name and description:
8283
```julia
8384
struct Policy{F}
8485
name::String
8586
description::String
8687
policy_function::F
8788
end
8889
```
89-
A `Policy` is just a function with a name and description.
9090

9191
Policies can be evaluated across multiple instances/environments using:
9292
```julia

docs/src/benchmarks/argmax.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# Argmax
2+
3+
!!! warning
4+
Documentation for this benchmark is still under development. Please refer to the source code and API for more details.

docs/src/benchmarks/fixed_size_shortest_path.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
[`FixedSizeShortestPathBenchmark`](@ref) is a benchmark problem that consists of finding the shortest path in a grid graph between the top left and bottom right corners.
44
In this benchmark, the grid size is the same for all instances.
5+
6+
!!! warning
7+
Documentation for this benchmark is still under development. Please refer to the source code and API for more details.

docs/src/benchmarks/portfolio_optimization.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ The goal is to predict asset prices $c$ and maximize the expected return of a po
1010
& x \geq 0
1111
\end{aligned}
1212
```
13+
14+
!!! warning
15+
Documentation for this benchmark is still under development. Please refer to the source code and API for more details.

docs/src/benchmarks/ranking.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
# Ranking
2+
3+
!!! warning
4+
Documentation for this benchmark is still under development. Please refer to the source code and API for more details.

docs/src/benchmarks/vsp.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
# Stochastic Vehicle Scheduling
22

33
[`StochasticVehicleSchedulingBenchmark`](@ref).
4+
5+
!!! warning
6+
Documentation for this benchmark is still under development. Please refer to the source code and API for more details.

docs/src/index.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,28 +12,31 @@
1212

1313
## What is Decision-Focused Learning?
1414

15-
Decision-focused learning (DFL) is a paradigm that integrates machine learning prediction with combinatorial optimization to make better decisions under uncertainty. Unlike traditional "predict-then-optimize" approaches that optimize prediction accuracy independently of downstream decision quality, DFL directly optimizes end-to-end decision performance.
15+
Decision-Focused Learning (DFL) is a paradigm that integrates machine learning prediction with combinatorial optimization to make better decisions under uncertainty.
16+
Unlike traditional "predict-then-optimize" approaches that optimize prediction accuracy independently of downstream decision quality, DFL directly optimizes end-to-end decision performance.
1617

1718
A typical DFL algorithm involves training a parametrized policy that combines a statistical predictor with an optimization component:
1819

1920
```math
20-
\xrightarrow{x} \boxed{\text{Statistical model } \varphi_w} \xrightarrow{\theta} \boxed{\text{CO algorithm } f} \xrightarrow{ y}
21+
x \;\longrightarrow\; \boxed{\,\text{Statistical model } \varphi_w\,}
22+
\;\xrightarrow{\theta}\; \boxed{\,\text{CO algorithm } f\,}
23+
\;\longrightarrow\; y
2124
```
2225

2326
Where:
24-
- **Instance** $x$: input data (e.g., features, context)
2527
- **Statistical model** $\varphi_w$: machine learning predictor (e.g., neural network)
26-
- **Parameters** $\theta$: predicted parameters for the optimization problem
2728
- **CO algorithm** $f$: combinatorial optimization solver
28-
- **Solution** $y$: final decision/solution
29+
- **Instance** $x$: input data (e.g., features, context)
30+
- **Parameters** $\theta$: predicted parameters for the optimization problem solved by `f`
31+
- **Solution** $y$: output decision/solution
2932

3033
## Package Overview
3134

3235
**DecisionFocusedLearningBenchmarks.jl** provides a comprehensive collection of benchmark problems for evaluating decision-focused learning algorithms. The package offers:
3336

3437
- **Standardized benchmark problems** spanning diverse application domains
35-
- **Common interfaces** for datasets, statistical models, and optimization components
36-
- **Ready-to-use pipelines** compatible with [InferOpt.jl](https://github.com/JuliaDecisionFocusedLearning/InferOpt.jl) and the whole [JuliaDecisionFocusedLearning](https://github.com/JuliaDecisionFocusedLearning) ecosystem
38+
- **Common interfaces** for creating datasets, statistical models, and optimization algorithms
39+
- **Ready-to-use DFL policies** compatible with [InferOpt.jl](https://github.com/JuliaDecisionFocusedLearning/InferOpt.jl) and the whole [JuliaDecisionFocusedLearning](https://github.com/JuliaDecisionFocusedLearning) ecosystem
3740
- **Evaluation tools** for comparing algorithm performance
3841

3942
## Benchmark Categories
@@ -51,13 +54,13 @@ Single-stage optimization problems with no randomness involved:
5154
- [`WarcraftBenchmark`](@ref): shortest path on image maps
5255

5356
### Stochastic Benchmarks (`AbstractStochasticBenchmark`)
54-
Single-stage problems with random noise affecting the objective:
57+
Single-stage optimization problems under uncertainty:
5558
- [`StochasticVehicleSchedulingBenchmark`](@ref): stochastic vehicle scheduling under delay uncertainty
5659

5760
### Dynamic Benchmarks (`AbstractDynamicBenchmark`)
5861
Multi-stage sequential decision-making problems:
5962
- [`DynamicVehicleSchedulingBenchmark`](@ref): multi-stage vehicle scheduling under customer uncertainty
60-
- [`DynamicAssortmentBenchmark`](@ref): sequential product assortment selection
63+
- [`DynamicAssortmentBenchmark`](@ref): sequential product assortment selection with endogenous uncertainty
6164

6265
## Getting Started
6366

@@ -83,6 +86,8 @@ maximizer = generate_maximizer(benchmark)
8386
gap = compute_gap(benchmark, dataset, model, maximizer)
8487
```
8588

89+
The only component you need to customize is the training algorithm itself.
90+
8691
## Related Packages
8792

8893
This package is part of the [JuliaDecisionFocusedLearning](https://github.com/JuliaDecisionFocusedLearning) organization, and built to be compatible with other packages in the ecosystem:

0 commit comments

Comments
 (0)