FraudDetector / Client / get_model_version

get_model_version#

FraudDetector.Client.get_model_version(**kwargs)#

Gets the details of the specified model version.

See also: AWS API Documentation

Request Syntax

response = client.get_model_version(
    modelId='string',
    modelType='ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
    modelVersionNumber='string'
)
Parameters:
  • modelId (string) –

    [REQUIRED]

    The model ID.

  • modelType (string) –

    [REQUIRED]

    The model type.

  • modelVersionNumber (string) –

    [REQUIRED]

    The model version number.

Return type:

dict

Returns:

Response Syntax

{
    'modelId': 'string',
    'modelType': 'ONLINE_FRAUD_INSIGHTS'|'TRANSACTION_FRAUD_INSIGHTS'|'ACCOUNT_TAKEOVER_INSIGHTS',
    'modelVersionNumber': 'string',
    'trainingDataSource': 'EXTERNAL_EVENTS'|'INGESTED_EVENTS',
    'trainingDataSchema': {
        'modelVariables': [
            'string',
        ],
        'labelSchema': {
            'labelMapper': {
                'string': [
                    'string',
                ]
            },
            'unlabeledEventsTreatment': 'IGNORE'|'FRAUD'|'LEGIT'|'AUTO'
        }
    },
    'externalEventsDetail': {
        'dataLocation': 'string',
        'dataAccessRoleArn': 'string'
    },
    'ingestedEventsDetail': {
        'ingestedEventsTimeWindow': {
            'startTime': 'string',
            'endTime': 'string'
        }
    },
    'status': 'string',
    'arn': 'string'
}

Response Structure

  • (dict) –

    • modelId (string) –

      The model ID.

    • modelType (string) –

      The model type.

    • modelVersionNumber (string) –

      The model version number.

    • trainingDataSource (string) –

      The 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) –

        • unlabeledEventsTreatment (string) –

          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 f 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.

    • externalEventsDetail (dict) –

      The details of the external events data used for training the model version. This will be populated if the trainingDataSource is EXTERNAL_EVENTS

      • 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.

    • ingestedEventsDetail (dict) –

      The details of the ingested events data used for training the model version. This will be populated if the trainingDataSource is INGESTED_EVENTS.

      • ingestedEventsTimeWindow (dict) –

        The start and stop time of the ingested events.

        • startTime (string) –

          Timestamp of the first ingensted event.

        • endTime (string) –

          Timestamp of the final ingested event.

    • status (string) –

      The model version status.

      Possible values are:

      • TRAINING_IN_PROGRESS

      • TRAINING_COMPLETE

      • ACTIVATE_REQUESTED

      • ACTIVATE_IN_PROGRESS

      • ACTIVE

      • INACTIVATE_REQUESTED

      • INACTIVATE_IN_PROGRESS

      • INACTIVE

      • ERROR

    • arn (string) –

      The model version ARN.

Exceptions

  • FraudDetector.Client.exceptions.ValidationException

  • FraudDetector.Client.exceptions.ResourceNotFoundException

  • FraudDetector.Client.exceptions.InternalServerException

  • FraudDetector.Client.exceptions.ThrottlingException

  • FraudDetector.Client.exceptions.AccessDeniedException