pub struct ShapValues {
pub values: Vec<f64>,
pub base_value: f64,
}Expand description
Per-feature SHAP contributions for a single prediction.
§Invariant
base_value + values.iter().sum::<f64>() ≈ model.predict(features)
Fields§
§values: Vec<f64>Per-feature SHAP contribution (positive = pushes prediction up).
base_value: f64Expected value of the model (mean prediction over training data).
Trait Implementations§
Source§impl Clone for ShapValues
impl Clone for ShapValues
Source§fn clone(&self) -> ShapValues
fn clone(&self) -> ShapValues
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ShapValues
impl RefUnwindSafe for ShapValues
impl Send for ShapValues
impl Sync for ShapValues
impl Unpin for ShapValues
impl UnsafeUnpin for ShapValues
impl UnwindSafe for ShapValues
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