pub struct CounterfactualQuery {
pub outcomes: Arc<[VariableId]>,
pub interventions: Arc<[Intervention]>,
pub allow_nested: bool,
}Expand description
Counterfactual query over factual observations and interventions.
Fields§
§outcomes: Arc<[VariableId]>Outcome variable(s) to predict under the counterfactual world.
interventions: Arc<[Intervention]>Interventions defining the counterfactual world (applied after abduction).
allow_nested: boolWhen true, allow nested counterfactual interventions under invertible SCMs.
Implementations§
Source§impl CounterfactualQuery
impl CounterfactualQuery
Sourcepub fn new(
outcome: VariableId,
interventions: impl Into<Arc<[Intervention]>>,
) -> Self
pub fn new( outcome: VariableId, interventions: impl Into<Arc<[Intervention]>>, ) -> Self
Construct a single-outcome counterfactual query.
Sourcepub const fn with_nested(self, allow_nested: bool) -> Self
pub const fn with_nested(self, allow_nested: bool) -> Self
Enable nested interventions where the model supports them.
Trait Implementations§
Source§impl Clone for CounterfactualQuery
impl Clone for CounterfactualQuery
Source§fn clone(&self) -> CounterfactualQuery
fn clone(&self) -> CounterfactualQuery
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for CounterfactualQuery
impl Debug for CounterfactualQuery
Source§impl From<CounterfactualQuery> for CausalQuery
impl From<CounterfactualQuery> for CausalQuery
Source§fn from(query: CounterfactualQuery) -> Self
fn from(query: CounterfactualQuery) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CounterfactualQuery
impl PartialEq for CounterfactualQuery
impl StructuralPartialEq for CounterfactualQuery
Auto Trait Implementations§
impl Freeze for CounterfactualQuery
impl RefUnwindSafe for CounterfactualQuery
impl Send for CounterfactualQuery
impl Sync for CounterfactualQuery
impl Unpin for CounterfactualQuery
impl UnsafeUnpin for CounterfactualQuery
impl UnwindSafe for CounterfactualQuery
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