Struct aws_sdk_frauddetector::types::builders::LabelSchemaBuilder
source · #[non_exhaustive]pub struct LabelSchemaBuilder { /* private fields */ }
Expand description
A builder for LabelSchema
.
Implementations§
source§impl LabelSchemaBuilder
impl LabelSchemaBuilder
sourcepub fn label_mapper(self, k: impl Into<String>, v: Vec<String>) -> Self
pub fn label_mapper(self, k: impl Into<String>, v: Vec<String>) -> Self
Adds a key-value pair to label_mapper
.
To override the contents of this collection use set_label_mapper
.
The label mapper maps the Amazon Fraud Detector supported model classification labels (FRAUD
, LEGIT
) to the appropriate event type labels. For example, if "FRAUD
" and "LEGIT
" are Amazon Fraud Detector supported labels, this mapper could be: {"FRAUD" => ["0"]
, "LEGIT" => ["1"]}
or {"FRAUD" => ["false"]
, "LEGIT" => ["true"]}
or {"FRAUD" => ["fraud", "abuse"]
, "LEGIT" => ["legit", "safe"]}
. The value part of the mapper is a list, because you may have multiple label variants from your event type for a single Amazon Fraud Detector label.
sourcepub fn set_label_mapper(
self,
input: Option<HashMap<String, Vec<String>>>
) -> Self
pub fn set_label_mapper( self, input: Option<HashMap<String, Vec<String>>> ) -> Self
The label mapper maps the Amazon Fraud Detector supported model classification labels (FRAUD
, LEGIT
) to the appropriate event type labels. For example, if "FRAUD
" and "LEGIT
" are Amazon Fraud Detector supported labels, this mapper could be: {"FRAUD" => ["0"]
, "LEGIT" => ["1"]}
or {"FRAUD" => ["false"]
, "LEGIT" => ["true"]}
or {"FRAUD" => ["fraud", "abuse"]
, "LEGIT" => ["legit", "safe"]}
. The value part of the mapper is a list, because you may have multiple label variants from your event type for a single Amazon Fraud Detector label.
sourcepub fn get_label_mapper(&self) -> &Option<HashMap<String, Vec<String>>>
pub fn get_label_mapper(&self) -> &Option<HashMap<String, Vec<String>>>
The label mapper maps the Amazon Fraud Detector supported model classification labels (FRAUD
, LEGIT
) to the appropriate event type labels. For example, if "FRAUD
" and "LEGIT
" are Amazon Fraud Detector supported labels, this mapper could be: {"FRAUD" => ["0"]
, "LEGIT" => ["1"]}
or {"FRAUD" => ["false"]
, "LEGIT" => ["true"]}
or {"FRAUD" => ["fraud", "abuse"]
, "LEGIT" => ["legit", "safe"]}
. The value part of the mapper is a list, because you may have multiple label variants from your event type for a single Amazon Fraud Detector label.
sourcepub fn unlabeled_events_treatment(self, input: UnlabeledEventsTreatment) -> Self
pub fn unlabeled_events_treatment(self, input: UnlabeledEventsTreatment) -> Self
The action to take for unlabeled events.
-
Use
IGNORE
if you want the unlabeled events to be ignored. This is recommended when the majority of the events in the dataset are labeled. -
Use
FRAUD
if you want to categorize all unlabeled events as “Fraud”. This is recommended when most of the events in your dataset are fraudulent. -
Use
LEGIT
if you want to categorize all unlabeled events as “Legit”. This is recommended when most of the events in your dataset are legitimate. -
Use
AUTO
if you want Amazon Fraud Detector to decide how to use the unlabeled data. This is recommended when there is significant unlabeled events in the dataset.
By default, Amazon Fraud Detector ignores the unlabeled data.
sourcepub fn set_unlabeled_events_treatment(
self,
input: Option<UnlabeledEventsTreatment>
) -> Self
pub fn set_unlabeled_events_treatment( self, input: Option<UnlabeledEventsTreatment> ) -> Self
The action to take for unlabeled events.
-
Use
IGNORE
if you want the unlabeled events to be ignored. This is recommended when the majority of the events in the dataset are labeled. -
Use
FRAUD
if you want to categorize all unlabeled events as “Fraud”. This is recommended when most of the events in your dataset are fraudulent. -
Use
LEGIT
if you want to categorize all unlabeled events as “Legit”. This is recommended when most of the events in your dataset are legitimate. -
Use
AUTO
if you want Amazon Fraud Detector to decide how to use the unlabeled data. This is recommended when there is significant unlabeled events in the dataset.
By default, Amazon Fraud Detector ignores the unlabeled data.
sourcepub fn get_unlabeled_events_treatment(
&self
) -> &Option<UnlabeledEventsTreatment>
pub fn get_unlabeled_events_treatment( &self ) -> &Option<UnlabeledEventsTreatment>
The action to take for unlabeled events.
-
Use
IGNORE
if you want the unlabeled events to be ignored. This is recommended when the majority of the events in the dataset are labeled. -
Use
FRAUD
if you want to categorize all unlabeled events as “Fraud”. This is recommended when most of the events in your dataset are fraudulent. -
Use
LEGIT
if you want to categorize all unlabeled events as “Legit”. This is recommended when most of the events in your dataset are legitimate. -
Use
AUTO
if you want Amazon Fraud Detector to decide how to use the unlabeled data. This is recommended when there is significant unlabeled events in the dataset.
By default, Amazon Fraud Detector ignores the unlabeled data.
sourcepub fn build(self) -> LabelSchema
pub fn build(self) -> LabelSchema
Consumes the builder and constructs a LabelSchema
.
Trait Implementations§
source§impl Clone for LabelSchemaBuilder
impl Clone for LabelSchemaBuilder
source§fn clone(&self) -> LabelSchemaBuilder
fn clone(&self) -> LabelSchemaBuilder
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for LabelSchemaBuilder
impl Debug for LabelSchemaBuilder
source§impl Default for LabelSchemaBuilder
impl Default for LabelSchemaBuilder
source§fn default() -> LabelSchemaBuilder
fn default() -> LabelSchemaBuilder
source§impl PartialEq for LabelSchemaBuilder
impl PartialEq for LabelSchemaBuilder
source§fn eq(&self, other: &LabelSchemaBuilder) -> bool
fn eq(&self, other: &LabelSchemaBuilder) -> bool
self
and other
values to be equal, and is used
by ==
.