Module decay

Module decay 

Source
Expand description

Unified parametric decay module.

All temporal and spatial decay in CELLSTATE is unified under the Weibull survival function, a single parametric family that subsumes exponential decay, heavy-tail decay, and sharp-cutoff decay:

S(x; τ, β) = exp( -ln(2) · (x / τ)^β )

where:

  • x ≥ 0 — independent variable (time in days, graph depth in hops, …)
  • τ > 0half-life parameter: S(τ; τ, 1) = 0.5
  • β > 0shape parameter:
    • β = 1.0 → standard memoryless exponential (current recency default)
    • β > 1.0 → super-exponential with sharp sigmoid-like cutoff
    • β < 1.0 → sub-exponential with heavy tail (graph proximity, etc.)

§Mathematical Properties (all verified by property tests)

  • P1 (Identity): S(0; τ, β) = 1 for all τ, β > 0
  • P2 (Half-life): S(τ; τ, 1) = 0.5
  • P3 (Monotonicity): x₁ ≤ x₂ ⟹ S(x₁) ≥ S(x₂)
  • P4 (Bounds): 0 ≤ S(x) ≤ 1 for all x ≥ 0
  • P5 (Asymptotic): lim_{x→∞} S(x) = 0
  • P6 (Smoothness): S is C^∞ for x > 0

§Subsumption of Legacy Decay Functions

Legacy functionEquivalent call
0.5^(t/7) (note recency)parametric_decay(t, &{7.0, 1.0})
0.5^(t/30) (artifact rec.)parametric_decay(t, &{30.0, 1.0})
0.5^(t/7) (warmth decay)parametric_decay(t, &{7.0, 1.0})
1 - d/D (graph linear)Replaced by parametric_decay(d, &{…})

Re-export path: cellstate_core::decay::*

Structs§

DecayParams
Configuration for a parametric decay function.
ScoringDecayConfig
Per-factor decay configuration.

Functions§

exponential_decay
Convenience: standard exponential decay with the given half-life.
parametric_decay
Weibull survival function: S(x; τ, β) = exp(-ln(2) · (x/τ)^β)