Skip to content
Back to skills

Particle Mirror Descent Kde Update

ASecurity

Use this skill to run the weighted kernel-density Particle Mirror Descent prox update loop with stochastic likelihood factors, normalized weights, Gaussian kernels, and trace logging.

  • 247 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added September 9, 2026
datapythonbash

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_kde_update --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Particle Mirror Descent Kde Update?

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

Security grade badge for Particle Mirror Descent Kde Update
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-particle-mirror-descent-kde-update/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-particle-mirror-descent-kde-update)

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_kde_update
description: Use this skill to run the weighted kernel-density Particle Mirror Descent prox update loop with stochastic likelihood factors, normalized weights, Gaussian kernels, and trace logging.
---

# KDE Particle Mirror Descent Update

## When To Use

Use this skill when a Bayesian target has log prior and log likelihood callbacks and the experiment needs a reduced PMD density approximation. Do not use it to define the data protocol or final acceptance metric.

## Inputs

- Prior sampler or prior standard deviation for two-dimensional particles.
- Single-datum log likelihood callback and log prior callback.
- Observations, particle count, iteration count, step size, bandwidth, and seed.

## Outputs

- Final particle locations and normalized weights.
- Gaussian KDE density evaluator on arbitrary points or grids.
- Training trace with stochastic datum indices, ESS, bandwidth, and parameter snapshots.

## Workflow

1. Initialize particles from the prior and equal weights.
2. At each iteration, choose one observation uniformly.
3. Resample from the current KDE by weighted ancestor choice plus Gaussian kernel jitter.
4. Apply exponentiated PMD-style log weights using likelihood, prior, and current-density correction terms.
5. Normalize weights with log-sum-exp and retain trace statistics.
6. Return a density evaluator for downstream total variation and mode metrics.

## Validation

Run:

```bash
python tests/test_kde_update.py
```

## Limitations

This reduced implementation is designed for bounded recovery and mechanism checks. It is not an optimized full-scale PMD implementation for million-sample datasets.

Files in this skill

  • SKILL.md1.6 KB
  • scripts/kde_update.py3.1 KB
  • tests/test_kde_update.py984 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.