pub struct InterventionEngine { /* private fields */ }Expand description
Engine for running causal interventions and estimating treatment effects.
Implementations§
Source§impl InterventionEngine
impl InterventionEngine
Sourcepub fn new(scm: StructuralCausalModel) -> Self
pub fn new(scm: StructuralCausalModel) -> Self
Create a new intervention engine wrapping a structural causal model.
Sourcepub fn do_intervention(
&self,
interventions: &[(String, f64)],
n_samples: usize,
seed: u64,
) -> Result<InterventionResult, SynthError>
pub fn do_intervention( &self, interventions: &[(String, f64)], n_samples: usize, seed: u64, ) -> Result<InterventionResult, SynthError>
Run a do-calculus intervention and estimate causal effects.
Generates baseline samples (no intervention) and intervened samples, then computes the average treatment effect for each variable.
Auto Trait Implementations§
impl Freeze for InterventionEngine
impl RefUnwindSafe for InterventionEngine
impl Send for InterventionEngine
impl Sync for InterventionEngine
impl Unpin for InterventionEngine
impl UnwindSafe for InterventionEngine
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more