pub struct SparsePermutationExplainer<M> { /* private fields */ }Expand description
Monte-Carlo permutation SHAP that keeps inputs, backgrounds, and coalition batches in CSR form. Explanation display data is densified once at the end.
Implementations§
Source§impl<M> SparsePermutationExplainer<M>
impl<M> SparsePermutationExplainer<M>
pub fn new(model: M, background: SparseMatrix) -> Result<Self>
pub fn with_n_permutations(self, count: usize) -> Self
pub fn with_seed(self, seed: u64) -> Self
pub fn with_antithetic(self, enabled: bool) -> Self
pub fn with_link(self, link: Link) -> Self
pub fn with_evaluation_config(self, config: EvaluationConfig) -> Self
Source§impl<M: SparsePredict> SparsePermutationExplainer<M>
impl<M: SparsePredict> SparsePermutationExplainer<M>
pub fn explain(&self, input: &SparseMatrix) -> Result<Explanation>
Auto Trait Implementations§
impl<M> Freeze for SparsePermutationExplainer<M>where
M: Freeze,
impl<M> RefUnwindSafe for SparsePermutationExplainer<M>where
M: RefUnwindSafe,
impl<M> Send for SparsePermutationExplainer<M>where
M: Send,
impl<M> Sync for SparsePermutationExplainer<M>where
M: Sync,
impl<M> Unpin for SparsePermutationExplainer<M>where
M: Unpin,
impl<M> UnsafeUnpin for SparsePermutationExplainer<M>where
M: UnsafeUnpin,
impl<M> UnwindSafe for SparsePermutationExplainer<M>where
M: 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