Spectral Closure¶
Module: spectralbridge.spectral_closure.
Focused scientific closure diagnostics; experimental, no production changes.
Paired partitions are descriptive balanced-panel sums of squares, not causal variance components or random regional effects. GlobalID is a polygon identity.
API glossary ยท Workflow / scientific context
Signatures and documentation below are collected from the current source. Advanced objects are not newly declared stable by inclusion here.
Audience: advanced.
spectral_shape ¶
spectral_shape(values, weights)
Per-observation weighted unit norm and amplitude; never fit on test rows.
Audience: advanced.
closure_labels ¶
closure_labels(table)
Explicit partial biological hierarchy; mixed cover is a proxy, not purity.
Audience: advanced.
paired_partition ¶
paired_partition(first, second, labels, weights)
Exact class/polygon/year/interaction/residual SS on a complete two-year panel.
Labels must be stable per identity. Columns are spectral coordinates with explicit positive quadrature weights. Class and polygon are nested; the balanced time structure makes this decomposition orthogonal even with unequal class sizes. Components describe this panel, not a causal population.
Audience: advanced.
paired_partition_bootstrap ¶
paired_partition_bootstrap(first, second, labels, weights, *, replicates=499, seed=20261015)
Class-stratified identity resampling preserves both years of each pair.
Audience: advanced.
one_vs_rest_metrics ¶
one_vs_rest_metrics(truth, predicted, classes)
Multiclass one-versus-rest rates; undefined denominators stay NaN.
Audience: advanced.
cluster_rate_intervals ¶
cluster_rate_intervals(truth, predicted, identities, classes, *, replicates=499, seed=20261015)
Conditional class-stratified whole-identity intervals for detection rates.