Formula used
Instantaneous regret: rt = Rt* − Rt
Cumulative regret: RT = Σt=1T rt
Average regret: R̄T = RT ÷ T
Discounted regret: Dt = γDt−1 + rt
Instantaneous regret measures one decision. Cumulative regret adds losses across all decisions. Lower growth usually indicates better long-term learning.
How to use
- Paste data or upload a CSV file.
- Select the regret definition and objective direction.
- Choose smoothing, aggregation, confidence, and filtering settings.
- Customise the Plotly chart and threshold line.
- Calculate, compare algorithms, and export the report.
Example data
| Step | Algorithm | Reward | Optimal reward | Run |
|---|---|---|---|---|
| 1 | Epsilon-Greedy | 0.55 | 0.90 | 1 |
| 2 | Epsilon-Greedy | 0.72 | 0.92 | 1 |
| 1 | UCB | 0.61 | 0.90 | 1 |
| 2 | UCB | 0.75 | 0.92 | 1 |
Interpretation guide
Realised regret uses observed rewards. Expected regret uses expected_reward when available. Pseudo-regret also compares expected values against the comparator.
A flatter cumulative curve is generally preferable. Confidence bands reveal uncertainty across repeated runs. Wide bands suggest unstable algorithm performance.
Negative regret can indicate noisy rewards. It may also reveal an incorrect comparator. Review suspicious rows before clamping values.
Frequently asked questions
What is a regret curve?
It plots decision loss against an optimal or chosen baseline over time.
Should cumulative regret always increase?
It usually increases when regret is nonnegative. Negative values can reduce it.
What does sublinear regret mean?
Average regret approaches zero as more decisions are made.
Why use repeated runs?
Repeated runs estimate variability and produce meaningful confidence bands.
What is pseudo-regret?
It compares expected rewards instead of only realised random outcomes.
When should I use discounted regret?
Use it when recent decisions matter more than older decisions.
Can this compare multiple algorithms?
Yes. Add algorithm names and matching run identifiers to rows.
Why can regret become negative?
An observed reward may exceed the stated optimal or baseline reward.
Which algorithm is best?
The calculator highlights the algorithm with lowest aggregated cumulative regret.