pub struct ShapleyConfig {
pub mode: ShapleyMode,
pub max_exact_components: usize,
pub allow_exact_override: bool,
pub seed: u64,
}Expand description
Configuration for Shapley allocation.
Fields§
§mode: ShapleyModeEstimation mode.
max_exact_components: usizeHard limit on exact combinatorial size (default 12).
allow_exact_override: boolWhen true, Exact may exceed max_exact_components (explicit override).
seed: u64RNG seed for approximate modes.
Implementations§
Source§impl ShapleyConfig
impl ShapleyConfig
Sourcepub const fn monte_carlo(n_samples: usize) -> Self
pub const fn monte_carlo(n_samples: usize) -> Self
Monte Carlo Shapley with n_samples coalition evaluations.
Sourcepub const fn permutation(n_permutations: usize) -> Self
pub const fn permutation(n_permutations: usize) -> Self
Permutation sampling with n_permutations random orders.
Sourcepub const fn with_max_exact_components(self, max: usize) -> Self
pub const fn with_max_exact_components(self, max: usize) -> Self
Override the exact size limit.
Sourcepub const fn with_exact_override(self, allow: bool) -> Self
pub const fn with_exact_override(self, allow: bool) -> Self
Allow Exact above the configured limit (explicit opt-in).
Trait Implementations§
Source§impl Clone for ShapleyConfig
impl Clone for ShapleyConfig
Source§fn clone(&self) -> ShapleyConfig
fn clone(&self) -> ShapleyConfig
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 moreimpl Copy for ShapleyConfig
Source§impl Debug for ShapleyConfig
impl Debug for ShapleyConfig
impl Eq for ShapleyConfig
Source§impl Hash for ShapleyConfig
impl Hash for ShapleyConfig
Source§impl PartialEq for ShapleyConfig
impl PartialEq for ShapleyConfig
impl StructuralPartialEq for ShapleyConfig
Auto Trait Implementations§
impl Freeze for ShapleyConfig
impl RefUnwindSafe for ShapleyConfig
impl Send for ShapleyConfig
impl Sync for ShapleyConfig
impl Unpin for ShapleyConfig
impl UnsafeUnpin for ShapleyConfig
impl UnwindSafe for ShapleyConfig
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