Regret Curve Calculator

Compare algorithm decisions against optimal rewards, explore regret growth, smooth noisy curves, inspect confidence bands, and export practical learning performance reports instantly with clarity.

Dataset

Required columns are step, algorithm, reward, and optimal_reward. Optional columns support expected regret, baselines, actions, and repeated runs.

Calculation options

Chart options

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

  1. Paste data or upload a CSV file.
  2. Select the regret definition and objective direction.
  3. Choose smoothing, aggregation, confidence, and filtering settings.
  4. Customise the Plotly chart and threshold line.
  5. Calculate, compare algorithms, and export the report.

Example data

StepAlgorithmRewardOptimal rewardRun
1Epsilon-Greedy0.550.901
2Epsilon-Greedy0.720.921
1UCB0.610.901
2UCB0.750.921

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.

Related Calculators

Episode Reward CurveAverage Reward CurveEpisode Length PlotExploration Rate CurveValue Function HeatmapPolicy HeatmapQ-Value PlotState-Transition DiagramSuccess Rate Curve

Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.