pub struct AutoExplainer<M, K = IndependentMasker> { /* private fields */ }Expand description
Automatic model-agnostic explainer selection with one shared configuration.
Exact SHAP is selected when the masker feature count is at most
exact_threshold; otherwise Kernel SHAP is used. Native tree and linear
models should still use their specialized explainers directly.
Implementations§
Source§impl<M> AutoExplainer<M, IndependentMasker>
impl<M> AutoExplainer<M, IndependentMasker>
pub fn new(model: M, background: Background) -> Self
Source§impl<M, K> AutoExplainer<M, K>
impl<M, K> AutoExplainer<M, K>
pub fn from_masker(model: M, masker: K) -> Self
pub fn with_exact_threshold(self, features: usize) -> Self
pub fn with_kernel_samples(self, samples: usize) -> Self
pub fn with_seed(self, seed: u64) -> Self
pub fn with_ridge(self, ridge: f64) -> Self
pub fn with_link(self, link: Link) -> Self
pub fn with_evaluation_config(self, evaluation: EvaluationConfig) -> Self
Source§impl<M, K: Masker> AutoExplainer<M, K>
impl<M, K: Masker> AutoExplainer<M, K>
pub fn selected_algorithm(&self) -> AutoAlgorithm
Trait Implementations§
Source§impl<M: Predict, K: Masker> Explainer for AutoExplainer<M, K>
impl<M: Predict, K: Masker> Explainer for AutoExplainer<M, K>
fn explain(&self, x: ArrayView2<'_, f64>) -> Result<Explanation>
Auto Trait Implementations§
impl<M, K> Freeze for AutoExplainer<M, K>
impl<M, K> RefUnwindSafe for AutoExplainer<M, K>where
M: RefUnwindSafe,
K: RefUnwindSafe,
impl<M, K> Send for AutoExplainer<M, K>
impl<M, K> Sync for AutoExplainer<M, K>
impl<M, K> Unpin for AutoExplainer<M, K>
impl<M, K> UnsafeUnpin for AutoExplainer<M, K>where
M: UnsafeUnpin,
K: UnsafeUnpin,
impl<M, K> UnwindSafe for AutoExplainer<M, K>where
M: UnwindSafe,
K: UnwindSafe,
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