Advanced simulation#

Advanced controls are opt-in and preserve the same deterministic identities and source/oracle boundaries as ordinary generation.

Warning

Calibration, campaign dynamics, and scale helpers are experimental in this release. Treat their serialized profiles and manifests as version-specific artifacts and consult the migration notes before upgrading.

Calibration#

fraudtwin.fit_calibration_profile

Fit the deterministic built-in aggregate profile.

fraudtwin.load_reference_data

Load and strictly validate one canonical Parquet reference table.

fraudtwin.load_calibration_profile

Load and validate a YAML calibration profile.

fraudtwin.write_calibration_profile

Write one immutable inspectable YAML profile and its JSON manifest.

fraudtwin.compute_fidelity_report

Compare generated aggregate values with a fitted profile.

fraudtwin.CalibrationProfile

Immutable collection of summaries, distributions, and provenance.

fraudtwin.CalibrationModel

Deterministic plug-in that fits summaries from a reference dataset.

fraudtwin.CalibrationMetric

Deterministic plug-in that scores generated aggregate summaries.

fraudtwin.CalibrationProvenance

Inputs and versions that identify how a profile was fitted.

fraudtwin.FeatureDependency

Conditional relationship used to preserve feature dependencies.

fraudtwin.FidelityMetric

One weighted comparison between reference and generated aggregates.

fraudtwin.FidelityReport

Immutable per-summary and composite fidelity assessment.

fraudtwin.FittedDistribution

Finite quantiles and bounds fitted from one reference column.

fraudtwin.ReferenceDataset

Validated reference data held only for the duration of fitting/scoring.

fraudtwin.ResolvedCalibration

Effective calibration context applied to a simulation configuration.

fraudtwin.StatisticalSummary

Immutable aggregate statistic captured in a calibration profile.

Counterfactuals, difficulty, and camouflage#

fraudtwin.generate_counterfactuals

Generate deterministic sidecar counterfactuals from a pristine stream.

fraudtwin.resolve_counterfactual

Resolve M14 precedence without consuming a random stream.

fraudtwin.select_source_trajectories

Select deterministic legitimate-only source trajectories.

fraudtwin.apply_difficulty

Apply resolved controls to one scenario without changing its objective.

fraudtwin.resolve_difficulty

Resolve a level and its optional per-dimension replacements.

fraudtwin.apply_camouflage

Return a stable per-scenario plan; no data or RNG is mutated.

fraudtwin.resolve_camouflage

Resolve global, family, and leaf M13 controls without consuming RNG.

fraudtwin.CounterfactualDataset

Original/modified sidecar records and oracle metadata.

fraudtwin.CounterfactualChangeSet

Machine-readable explanation of one accepted or rejected request.

fraudtwin.CounterfactualScope

Resolved controls for one objective request.

fraudtwin.DistanceFunction

Protocol implemented by pluggable counterfactual distances.

fraudtwin.ResolvedDifficulty

Complete, hashable M12 difficulty configuration.

fraudtwin.ResolvedCamouflage

Complete, deterministic and hashable M13 configuration.

fraudtwin.ScenarioDifficultyPlan

Resolved transformations for one fraud or graph scenario.

fraudtwin.CamouflagePlan

Resolved strengths for one generator family and scenario.

fraudtwin.SourceTrajectory

One legitimate source payment and its point-in-time snapshot.

Campaign dynamics and labels#

fraudtwin.evolve_campaigns

Evolve all configured M11 campaigns in stable order.

fraudtwin.resolve_campaign_dynamics

Validate and resolve registered models without consuming randomness.

fraudtwin.validate_campaign_dynamics

Validate dynamic IDs, lifecycle records, graph membership, and ledger closure.

fraudtwin.apply_label_observation

Apply a deterministic observation policy without mutating source records.

fraudtwin.visible_label_at

Resolve the latest label version available at a prediction timestamp.

fraudtwin.reconstruct_label_history

Return the immutable versions in validated chronological order.