Skip to main content

Module behavioral_fidelity

Module behavioral_fidelity 

Source
Expand description

P1–P4 behavioral-fidelity evaluation for GL data.

Implements the Sajja (2026) framework adapted for GL semantics: Source as the primary entity, TradingPartner as secondary, EntryDate at day resolution, with a structural JE-line-burst metric and a canonical R1..R10 velocity rule set. Anchors every metric to a 50/50-split noise floor via the degradation-ratio normaliser.

Spec: docs/superpowers/specs/2026-05-11-sp1-behavioral-fidelity-design.md.

Re-exports§

pub use entity_profile::gl_source_tp;
pub use entity_profile::reference_corpus_aliases;
pub use entity_profile::synthetic_aliases;
pub use error::BehavioralFidelityError;
pub use error::BehavioralFidelityResult;
pub use report::BehavioralFidelityReport;
pub use types::BehavioralFidelityConfig;
pub use types::EntityProfile;
pub use types::GateThresholds;
pub use types::Record;
pub use types::RuleSet;

Modules§

burst
P2 — Burst structure: active lifetime + burst length + JE-line-burst.
degradation
Noise-floor anchored degradation-ratio normaliser.
entity_profile
Entity profile preset + column alias maps for SP1.
error
Errors emitted by the behavioral-fidelity module.
fanout
P3 — Shared-infrastructure graph motifs.
ietd
P1 — Inter-event time distribution + within-entity autocorrelation.
intraday
Synth-only intraday structural metrics (second resolution, off-hours rate).
loader
Parquet / CSV loader producing canonical Records.
math
Numerical primitives shared across the behavioral-fidelity metrics.
report
BehavioralFidelityReport struct + JSON / Markdown / CSV serialisation.
types
Core types shared across the behavioral-fidelity module.
velocity_rules
P4 — Velocity-rule trigger rate gap.

Functions§

compute_report
compute_report_from_paths