#[non_exhaustive]pub struct ClarifyShapBaselineConfig {
pub mime_type: Option<String>,
pub shap_baseline: Option<String>,
pub shap_baseline_uri: Option<String>,
}
Expand description
The configuration for the SHAP baseline (also called the background or reference dataset) of the Kernal SHAP algorithm.
-
The number of records in the baseline data determines the size of the synthetic dataset, which has an impact on latency of explainability requests. For more information, see the Synthetic data of Configure and create an endpoint.
-
ShapBaseline
andShapBaselineUri
are mutually exclusive parameters. One or the either is required to configure a SHAP baseline.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.mime_type: Option<String>
The MIME type of the baseline data. Choose from 'text/csv'
or 'application/jsonlines'
. Defaults to 'text/csv'
.
shap_baseline: Option<String>
The inline SHAP baseline data in string format. ShapBaseline
can have one or multiple records to be used as the baseline dataset. The format of the SHAP baseline file should be the same format as the training dataset. For example, if the training dataset is in CSV format and each record contains four features, and all features are numerical, then the format of the baseline data should also share these characteristics. For natural language processing (NLP) of text columns, the baseline value should be the value used to replace the unit of text specified by the Granularity
of the TextConfig
parameter. The size limit for ShapBasline
is 4 KB. Use the ShapBaselineUri
parameter if you want to provide more than 4 KB of baseline data.
shap_baseline_uri: Option<String>
The uniform resource identifier (URI) of the S3 bucket where the SHAP baseline file is stored. The format of the SHAP baseline file should be the same format as the format of the training dataset. For example, if the training dataset is in CSV format, and each record in the training dataset has four features, and all features are numerical, then the baseline file should also have this same format. Each record should contain only the features. If you are using a virtual private cloud (VPC), the ShapBaselineUri
should be accessible to the VPC. For more information about setting up endpoints with Amazon Virtual Private Cloud, see Give SageMaker access to Resources in your Amazon Virtual Private Cloud.
Implementations§
source§impl ClarifyShapBaselineConfig
impl ClarifyShapBaselineConfig
sourcepub fn mime_type(&self) -> Option<&str>
pub fn mime_type(&self) -> Option<&str>
The MIME type of the baseline data. Choose from 'text/csv'
or 'application/jsonlines'
. Defaults to 'text/csv'
.
sourcepub fn shap_baseline(&self) -> Option<&str>
pub fn shap_baseline(&self) -> Option<&str>
The inline SHAP baseline data in string format. ShapBaseline
can have one or multiple records to be used as the baseline dataset. The format of the SHAP baseline file should be the same format as the training dataset. For example, if the training dataset is in CSV format and each record contains four features, and all features are numerical, then the format of the baseline data should also share these characteristics. For natural language processing (NLP) of text columns, the baseline value should be the value used to replace the unit of text specified by the Granularity
of the TextConfig
parameter. The size limit for ShapBasline
is 4 KB. Use the ShapBaselineUri
parameter if you want to provide more than 4 KB of baseline data.
sourcepub fn shap_baseline_uri(&self) -> Option<&str>
pub fn shap_baseline_uri(&self) -> Option<&str>
The uniform resource identifier (URI) of the S3 bucket where the SHAP baseline file is stored. The format of the SHAP baseline file should be the same format as the format of the training dataset. For example, if the training dataset is in CSV format, and each record in the training dataset has four features, and all features are numerical, then the baseline file should also have this same format. Each record should contain only the features. If you are using a virtual private cloud (VPC), the ShapBaselineUri
should be accessible to the VPC. For more information about setting up endpoints with Amazon Virtual Private Cloud, see Give SageMaker access to Resources in your Amazon Virtual Private Cloud.
source§impl ClarifyShapBaselineConfig
impl ClarifyShapBaselineConfig
sourcepub fn builder() -> ClarifyShapBaselineConfigBuilder
pub fn builder() -> ClarifyShapBaselineConfigBuilder
Creates a new builder-style object to manufacture ClarifyShapBaselineConfig
.
Trait Implementations§
source§impl Clone for ClarifyShapBaselineConfig
impl Clone for ClarifyShapBaselineConfig
source§fn clone(&self) -> ClarifyShapBaselineConfig
fn clone(&self) -> ClarifyShapBaselineConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ClarifyShapBaselineConfig
impl Debug for ClarifyShapBaselineConfig
impl StructuralPartialEq for ClarifyShapBaselineConfig
Auto Trait Implementations§
impl Freeze for ClarifyShapBaselineConfig
impl RefUnwindSafe for ClarifyShapBaselineConfig
impl Send for ClarifyShapBaselineConfig
impl Sync for ClarifyShapBaselineConfig
impl Unpin for ClarifyShapBaselineConfig
impl UnwindSafe for ClarifyShapBaselineConfig
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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