Skip to content
Back to skills

Particle Mirror Descent Density Metrics

ASecurity

Use this skill to score Particle Mirror Descent density approximations against reduced posterior targets with total variation, cross entropy, and symmetric mode coverage diagnostics.

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

Security analysis

A100/100

Pro scans all 3 files and shows the line behind each finding

Scanned September 9, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Particle Mirror Descent Density Metrics?

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

Security grade badge for Particle Mirror Descent Density Metrics
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-particle-mirror-descent-density-metrics/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-particle-mirror-descent-density-metrics)

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

Download with Pro
SKILL.md
---
name: particle_mirror_descent_density_metrics
description: Use this skill to score Particle Mirror Descent density approximations against reduced posterior targets with total variation, cross entropy, and symmetric mode coverage diagnostics.
---

# Posterior Density and Mode Metrics

## When To Use

Use this skill after a PMD or proxy density run has produced particles, weights, grid densities, or explicit mode locations. Do not use it to generate observations or update particles.

## Inputs

- Particle locations and normalized weights.
- Expected posterior mode coordinates and a radius for reduced mode checks.
- Optional grid target and estimated density arrays with a cell area.

## Outputs

- `total_variation` and `cross_entropy` for grid densities when available.
- Per-mode mass, mass ratio, effective sample size, and `mode_coverage_score`.
- Mechanism-check booleans suitable for recovery validation.

## Workflow

1. Confirm weights are nonnegative and normalized within numerical tolerance.
2. Accumulate particle mass inside each expected mode ball.
3. Convert balanced multimodal support into `mode_coverage_score`.
4. For grid inputs, compute total variation and cross entropy with a shared cell area.
5. Emit mechanism checks that distinguish metric success from actual PMD execution.

## Validation

Run:

```bash
python tests/test_density_metrics.py
```

## Limitations

The mode score is a reduced synthetic proxy for the paper's full figure-level total variation and cross-entropy comparisons. It should be interpreted only with the recorded PMD trace.

Files in this skill

  • SKILL.md1.5 KB
  • scripts/density_metrics.py2.3 KB
  • tests/test_density_metrics.py723 B

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…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.