计划执行与检查节点
executing-plans
按既定实施计划完成工作,保持过程检查和反馈。
stein_kernel_loss【效率与协作】Compute one-dimensional kernel Stein and diffusion kernel Stein losses for unnormalized model recovery experiments.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
Use this skill when a task needs to evaluate an empirical KSD or scalar diffusion KSD objective for a one-dimensional unnormalized model. It is appropriate for bounded recovery experiments, diagnostics, and cross-checks of minimum Stein discrepancy estimators. Do not use it as a general multidimensional matrix-kernel implementation.
samples: at least two numeric observations.theta: model parameter used by the score and diffusion functions.score_fn(x, theta): derivative of the log unnormalized density with respect to x.bandwidth: positive Gaussian-kernel bandwidth.diffusion_fn(x, theta) and diffusion_derivative_fn(x, theta) for scalar DKSD.u_statistic_loss from scripts/stein_loss.py for a candidate parameter.Run python -m pytest tests or validate through the Distiller skill-tree validator with --run-tests.
This skill implements the scalar one-dimensional special case used for fast recovery. It intentionally does not implement the full matrix-valued RKHS formula or Riemannian geometry from the paper.