Skip to content
Back to skills

Unbalanced Partial

ASecurity

"Use POT unbalanced and partial optimal transport solvers when

  • 247 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added September 8, 2026
toolsapibackend

Works with

  • api

Security analysis

A100/100

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

Scanned September 8, 2026

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

Installs into .claude/skills of the current project.

Are you the author of Unbalanced Partial?

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

Security grade badge for Unbalanced Partial
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/vectorspacelab-unbalanced-partial/badge)](https://www.skillsdirectory.com/skills/vectorspacelab-unbalanced-partial)

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: unbalanced-partial
description: "Use POT unbalanced and partial optimal transport solvers when
  masses may differ, outliers should be ignored, or only part of the mass should
  move."
disable-model-invocation: true
metadata:
  disco-role: operating
license: MIT
---

# POT unbalanced and partial optimal transport

Use this sub-skill when a POT task is about relaxed marginals, unequal total mass, explicit transported mass, outlier rejection, unbalanced barycenters, or regularization paths for unbalanced OT.

## Route the request

- Read [references/api-reference.md](references/api-reference.md) when choosing between `ot.unbalanced.*`, `ot.partial.*`, `ot.regpath.*`, and unified `ot.solve(..., unbalanced=...)` APIs or when checking signatures, return shapes, and parameter meanings.
- Read [references/workflows.md](references/workflows.md) when implementing an end-to-end recipe: compare UOT against partial OT for outliers, stabilize entropic partial OT, build an unbalanced barycenter, use 1D helpers, or sample an L2-UOT regularization path.
- Read [references/troubleshooting.md](references/troubleshooting.md) when a plan has unexpected mass, `m` is infeasible, `reg`/`reg_m` are confused, a divergence name is rejected, small entropic regularization produces NaNs, or optional backend behavior is unclear.
- Run [scripts/unbalanced_partial_smoke.py](scripts/unbalanced_partial_smoke.py) after installing POT to check deterministic NumPy UOT/partial/barycenter/regpath behavior; the legacy `--include-optional-uot-1d` flag attempts the optional autodiff-backed 1D UOT check and records a structured skip when that backend is unavailable.

## Boundaries

This sub-skill owns unbalanced and partial OT semantics: `sinkhorn_unbalanced`, `sinkhorn_unbalanced2`, `mm_unbalanced`, `lbfgsb_unbalanced`, `uot_1d`, `barycenter_unbalanced`, `partial_wasserstein`, `entropic_partial_wasserstein`, `partial_wasserstein_1d`, unbalanced/partial GW routing notes, and `ot.regpath` L2-UOT paths.

Route balanced exact OT, balanced Sinkhorn basics, distance matrix construction basics, and `OTResult` fundamentals to `core-solvers`. Route detailed Gromov-Wasserstein and fused GW modeling to `gromov`. Route sliced high-dimensional UOT variants and Gaussian/GMM approximations to `sliced-gaussian-large-scale`. Route optional backend installation, batch solvers, and mixed-array backend issues to `backend-and-batch`.

## Operating checklist

1. Validate that weights are one-dimensional, nonnegative, finite, and aligned with the rows/columns of the cost matrix.
2. Decide the mass model: UOT relaxes marginal constraints with `reg_m`/`unbalanced`; partial OT fixes transported mass with `m`.
3. Scale or inspect the cost matrix before choosing `reg` and `reg_m`; the same numeric parameters mean different things after cost rescaling.
4. Validate the returned plan: shape `(len(a), len(b))`, finite nonnegative entries, transported mass, and row/column sums appropriate to UOT or partial constraints.
5. For entropic partial OT at small `reg`, prefer `method="sinkhorn_log"` and confirm finite output plus `plan.sum() ≈ m`.

Files in this skill

  • SKILL.md3.1 KB
  • references/api-reference.md9.9 KB
  • references/troubleshooting.md8.7 KB
  • references/workflows.md8.7 KB
  • scripts/unbalanced_partial_smoke.py16.2 KB

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.