Create a label - Amazon Fraud Detector

Create a label

A label classifies an event as fraudulent or legitimate. Once you have created a label, add the label to the event type by calling the PutEventType API.

Use labels to train supervised machine learning models in Amazon Fraud Detector. As part of model version configuration, you classify the event labels as either fraudulent or legitimate. The supervised model will then learn to classify events using the variable values.

To create a label using the AWS Console, open the AWS Console and sign in to your account. Navigate to Amazon Fraud Detector and in the left navigation pane, choose Labels, then choose Create.

Create a label using the AWS SDK for Python (Boto3)

The following example shows requests for the PutLabel API. The example creates two labels (fraud, legit). You can add these labels to an event type to classify specific events.

import boto3 fraudDetector = boto3.client('frauddetector') fraudDetector.put_label( name = 'fraud', description = 'label for fraud events' ) fraudDetector.put_label( name = 'legit', description = 'label for legitimate events' )