pub struct ChangeAttributionQuery {
pub outcome: VariableId,
pub baseline: PopulationSelector,
pub comparison: PopulationSelector,
pub components: AttributionComponents,
pub allocation: AllocationMethod,
pub max_components: usize,
}Expand description
Distribution / population change attribution query.
Fields§
§outcome: VariableIdOutcome whose marginal (or summary) change is attributed.
baseline: PopulationSelectorBaseline population / period.
comparison: PopulationSelectorComparison population / period.
components: AttributionComponentsWhich structural pieces participate.
allocation: AllocationMethodAllocation rule.
max_components: usizeMaximum number of attribution components (hard size guard for Exact).
Implementations§
Source§impl ChangeAttributionQuery
impl ChangeAttributionQuery
Sourcepub fn new(
outcome: VariableId,
baseline: PopulationSelector,
comparison: PopulationSelector,
) -> Self
pub fn new( outcome: VariableId, baseline: PopulationSelector, comparison: PopulationSelector, ) -> Self
Construct with Shapley Monte Carlo allocation (common pinned baseline-GCM path).
Sourcepub const fn with_components(self, components: AttributionComponents) -> Self
pub const fn with_components(self, components: AttributionComponents) -> Self
Set component family.
Sourcepub fn with_allocation(self, allocation: AllocationMethod) -> Self
pub fn with_allocation(self, allocation: AllocationMethod) -> Self
Set allocation method.
Sourcepub const fn with_max_components(self, max_components: usize) -> Self
pub const fn with_max_components(self, max_components: usize) -> Self
Cap the number of components considered.
Trait Implementations§
Source§impl Clone for ChangeAttributionQuery
impl Clone for ChangeAttributionQuery
Source§fn clone(&self) -> ChangeAttributionQuery
fn clone(&self) -> ChangeAttributionQuery
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 ChangeAttributionQuery
impl Debug for ChangeAttributionQuery
impl Eq for ChangeAttributionQuery
Source§impl From<ChangeAttributionQuery> for CausalQuery
impl From<ChangeAttributionQuery> for CausalQuery
Source§fn from(query: ChangeAttributionQuery) -> Self
fn from(query: ChangeAttributionQuery) -> Self
Converts to this type from the input type.
Source§impl Hash for ChangeAttributionQuery
impl Hash for ChangeAttributionQuery
Source§impl PartialEq for ChangeAttributionQuery
impl PartialEq for ChangeAttributionQuery
impl StructuralPartialEq for ChangeAttributionQuery
Auto Trait Implementations§
impl Freeze for ChangeAttributionQuery
impl RefUnwindSafe for ChangeAttributionQuery
impl Send for ChangeAttributionQuery
impl Sync for ChangeAttributionQuery
impl Unpin for ChangeAttributionQuery
impl UnsafeUnpin for ChangeAttributionQuery
impl UnwindSafe for ChangeAttributionQuery
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