oineus.diff.persistence_diagram¶
- oineus.diff.persistence_diagram(fil, dualize=None, include_inf_points=False, gradient_method='dgm-loss', step_size=1.0, conflict_strategy='avg', n_threads=None, u_strategy=None, dims_to_backprop=None)[source]¶
Compute differentiable persistence diagrams from a DiffFiltration.
- Parameters:
fil (DiffFiltration) – DiffFiltration with differentiable values tensor.
dualize – cohomology if True, homology if False. None (default) uses the FiltrationKind reduction policy. Currently this picks cohomology for VR and homology otherwise.
include_inf_points (bool) – Phase 1 only supports False. Setting True raises NotImplementedError.
gradient_method (str) – “dgm-loss” or “crit-sets”.
step_size (float) – scales grad_output to a target diagram (target = current - step_size * grad_output) for crit-sets. Ignored for dgm-loss.
conflict_strategy – “avg”, “max”, “sum”, or “fca”, or any _oineus.ConflictStrategy. Used only for crit-sets.
n_threads – parallelism for the forward reduction and the partial-U pass in backward.
u_strategy – “auto” (default), “row_partial”, or “legacy_in_band”, or any _oineus.UStrategy. Used only for crit-sets.
dims_to_backprop – list of geometric dims to restore ELZ in during the forward reduction. None defaults to all dims of the filtration. Used only for crit-sets.
- Returns:
dict-like, dim -> Tensor (N, 2). Gradients flow back to fil.values.
- Return type: