Skip to main content

Module sparsemap

Module sparsemap 

Source
Expand description

SparseMAP over an explicit finite structured domain.

SparseMAP is the Fenchel-Young prediction map induced by squared L2 regularization over a structured marginal polytope. This module starts with the smallest useful domain representation: callers provide the vertices of the polytope explicitly, and the solver returns the projected marginal plus the sparse convex combination that produced it.

This is intentionally not wired into crate::fenchel::Regularizer. Regularizer is the simplex-valued API; SparseMAP needs a structured domain boundary.

Structs§

SparseMapPrediction
SparseMAP prediction over an explicit finite vertex set.
SparseMapWeight
One active vertex in a SparseMAP prediction.

Functions§

sparsemap_explicit
Compute SparseMAP over an explicit list of vertices.
sparsemap_loss_explicit
Compute the SparseMAP Fenchel-Young loss for an explicit-domain target.