pub struct ParallelPermutationImportance<F> { /* private fields */ }Expand description
Parallel permutation importance computation
Implementations§
Source§impl<F> ParallelPermutationImportance<F>
impl<F> ParallelPermutationImportance<F>
Sourcepub fn new(
model: Arc<F>,
scoring_fn: fn(&ArrayView1<'_, Float>, &ArrayView1<'_, Float>) -> Float,
) -> Self
pub fn new( model: Arc<F>, scoring_fn: fn(&ArrayView1<'_, Float>, &ArrayView1<'_, Float>) -> Float, ) -> Self
Create a new parallel permutation importance calculator
Trait Implementations§
Source§impl<F> ParallelExplanation for ParallelPermutationImportance<F>
impl<F> ParallelExplanation for ParallelPermutationImportance<F>
type Input = PermutationInput
type Output = Vec<f64>
type Config = ()
Source§fn compute_single(
&self,
input: &Self::Input,
_config: &Self::Config,
) -> SklResult<Self::Output>
fn compute_single( &self, input: &Self::Input, _config: &Self::Config, ) -> SklResult<Self::Output>
Compute explanation for a single instance
Source§fn compute_parallel(
&self,
inputs: &[Self::Input],
config: &Self::Config,
parallel_config: &ParallelConfig,
) -> SklResult<Vec<Self::Output>>
fn compute_parallel( &self, inputs: &[Self::Input], config: &Self::Config, parallel_config: &ParallelConfig, ) -> SklResult<Vec<Self::Output>>
Compute explanations in parallel for multiple instances
Auto Trait Implementations§
impl<F> Freeze for ParallelPermutationImportance<F>
impl<F> RefUnwindSafe for ParallelPermutationImportance<F>where
F: RefUnwindSafe,
impl<F> Send for ParallelPermutationImportance<F>
impl<F> Sync for ParallelPermutationImportance<F>
impl<F> Unpin for ParallelPermutationImportance<F>
impl<F> UnwindSafe for ParallelPermutationImportance<F>where
F: RefUnwindSafe,
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more