Skip to content
Back to skills

D4rl Score Normalization

ASecurity

Compute and audit D4RL normalized returns from raw, random-baseline, and expert-reference scores.

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 9, 2026
testingpython

Works with

  • cli

Security analysis

A100/100

Scanned September 9, 2026

npx -y skills add VectorSpaceLab/AREX-Skill --skill d4rl_score_normalization --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of D4rl Score Normalization?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for D4rl Score Normalization
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-d4rl-score-normalization/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-d4rl-score-normalization)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

SKILL.md
---
name: d4rl_score_normalization
description: Compute and audit D4RL normalized returns from raw, random-baseline, and expert-reference scores.
---

# D4RL Score Normalization

Use this skill when reporting or checking D4RL-style benchmark scores across tasks with different raw return scales. Do not use it as evidence that offline training was faithful; combine it with dataset and recovery-harness checks.

## Inputs

- `score`: raw policy return.
- `random_score`: return assigned to the 0-point reference.
- `expert_score`: return assigned to the 100-point reference.

## Outputs

- `normalized_score` using `100 * (score - random_score) / (expert_score - random_score)`.
- `diagnostics` with denominator, endpoint interpretation, and extrapolation flags.

## Workflow

1. Parse all values as floats.
2. Reject equal random and expert scores because the normalization denominator is zero.
3. Compute the normalized score with the D4RL formula.
4. Preserve raw inputs in the result for reproducibility.
5. Flag scores below random or above expert without clipping them.

## Validation

Run `python scripts/normalize_score.py --score 5 --random-score 0 --expert-score 10`. The tests cover random, expert, midpoint, extrapolated, and degenerate baseline cases.

## Limitations

This skill does not choose environment-specific reference scores. The caller must provide the paper, benchmark, or recovery-target baselines.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…