2021/08/23 - Amazon Fraud Detector - 1 updated api methods
Changes Updated an element of the DescribeModelVersion API response (LogitMetrics -> logOddsMetrics) for clarity. Added new exceptions to several APIs to protect against unlikely scenarios.
{'modelVersionDetails': {'trainingResult': {'variableImportanceMetrics': {'logOddsMetrics': [{'variableImportance': 'float', 'variableName': 'string', 'variableType': 'string'}]}}}}
Gets all of the model versions for the specified model type or for the specified model type and model ID. You can also get details for a single, specified model version.
See also: AWS API Documentation
Request Syntax
client.describe_model_versions( modelId='string', modelVersionNumber='string', modelType='ONLINE_FRAUD_INSIGHTS', nextToken='string', maxResults=123 )
string
The model ID.
string
The model version number.
string
The model type.
string
The next token from the previous results.
integer
The maximum number of results to return.
dict
Response Syntax
{ 'modelVersionDetails': [ { 'modelId': 'string', 'modelType': 'ONLINE_FRAUD_INSIGHTS', 'modelVersionNumber': 'string', 'status': 'string', 'trainingDataSource': 'EXTERNAL_EVENTS', 'trainingDataSchema': { 'modelVariables': [ 'string', ], 'labelSchema': { 'labelMapper': { 'string': [ 'string', ] } } }, 'externalEventsDetail': { 'dataLocation': 'string', 'dataAccessRoleArn': 'string' }, 'trainingResult': { 'dataValidationMetrics': { 'fileLevelMessages': [ { 'title': 'string', 'content': 'string', 'type': 'string' }, ], 'fieldLevelMessages': [ { 'fieldName': 'string', 'identifier': 'string', 'title': 'string', 'content': 'string', 'type': 'string' }, ] }, 'trainingMetrics': { 'auc': ..., 'metricDataPoints': [ { 'fpr': ..., 'precision': ..., 'tpr': ..., 'threshold': ... }, ] }, 'variableImportanceMetrics': { 'logOddsMetrics': [ { 'variableName': 'string', 'variableType': 'string', 'variableImportance': ... }, ] } }, 'lastUpdatedTime': 'string', 'createdTime': 'string', 'arn': 'string' }, ], 'nextToken': 'string' }
Response Structure
(dict) --
modelVersionDetails (list) --
The model version details.
(dict) --
The details of the model version.
modelId (string) --
The model ID.
modelType (string) --
The model type.
modelVersionNumber (string) --
The model version number.
status (string) --
The status of the model version.
trainingDataSource (string) --
The model version training data source.
trainingDataSchema (dict) --
The training data schema.
modelVariables (list) --
The training data schema variables.
(string) --
labelSchema (dict) --
The label schema.
labelMapper (dict) --
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.
(string) --
(list) --
(string) --
externalEventsDetail (dict) --
The event details.
dataLocation (string) --
The Amazon S3 bucket location for the data.
dataAccessRoleArn (string) --
The ARN of the role that provides Amazon Fraud Detector access to the data location.
trainingResult (dict) --
The training results.
dataValidationMetrics (dict) --
The validation metrics.
fileLevelMessages (list) --
The file-specific model training validation messages.
(dict) --
The message details.
title (string) --
The message title.
content (string) --
The message content.
type (string) --
The message type.
fieldLevelMessages (list) --
The field-specific model training validation messages.
(dict) --
The message details.
fieldName (string) --
The field name.
identifier (string) --
The message ID.
title (string) --
The message title.
content (string) --
The message content.
type (string) --
The message type.
trainingMetrics (dict) --
The training metric details.
auc (float) --
The area under the curve. This summarizes true positive rate (TPR) and false positive rate (FPR) across all possible model score thresholds. A model with no predictive power has an AUC of 0.5, whereas a perfect model has a score of 1.0.
metricDataPoints (list) --
The data points details.
(dict) --
Model performance metrics data points.
fpr (float) --
The false positive rate. This is the percentage of total legitimate events that are incorrectly predicted as fraud.
precision (float) --
The percentage of fraud events correctly predicted as fraudulent as compared to all events predicted as fraudulent.
tpr (float) --
The true positive rate. This is the percentage of total fraud the model detects. Also known as capture rate.
threshold (float) --
The model threshold that specifies an acceptable fraud capture rate. For example, a threshold of 500 means any model score 500 or above is labeled as fraud.
variableImportanceMetrics (dict) --
The variable importance metrics.
logOddsMetrics (list) --
List of variable metrics.
(dict) --
The log odds metric details.
variableName (string) --
The name of the variable.
variableType (string) --
The type of variable.
variableImportance (float) --
The relative importance of the variable. For more information, see Model variable importance.
lastUpdatedTime (string) --
The timestamp when the model was last updated.
createdTime (string) --
The timestamp when the model was created.
arn (string) --
The model version ARN.
nextToken (string) --
The next token.