Step 3: Add rules to a detector - Amazon Fraud Detector

Step 3: Add rules to a detector

After you have named your detector and added a model, you can create rules to interpret your Amazon Fraud Detector model’s score. For this exercise, you create three rules: high_fraud_risk, medium_fraud_risk, and low_fraud_risk.

  1. On Step 3 – Add rules, enter high_fraud_risk for the rule name under Define a rule, and enter This rule captures events with a high ML model score as the description for the rule.

  2. In Expression, enter the following rule expression using the Amazon Fraud Detector simplified rule expression language:

    $sample_fraud_detection_model_insightscore > 900

  3. In Outcomes, choose Create a new outcome. An outcome is the result from a fraud prediction and is returned if the rule matches during an evaluation.

  4. In Create a new outcome, enter verify_customer as the outcome name. Optionally, enter a description.

  5. Choose Save outcome. For details, see Create an outcome.

  6. Choose Add rule to run the rule validation checker and save the rule. After it's created, Amazon Fraud Detector makes the rule available for use in your detector.

  7. Choose Add another rule, and then choose the Create rule tab.

  8. Repeat this process twice more to create your medium_fraud_risk and low_fraud_risk rules using the following rule details:

    • medium_fraud_risk

      Rule name: medium_fraud_risk

      Outcome: review


      $sample_fraud_detection_model_insightscore <= 900 and

      $sample_fraud_detection_model_insightscore > 700

    • low_fraud_risk

      Rule name: low_fraud_risk

      Outcome: approve


      $sample_fraud_detection_model_insightscore <= 700

    These values are examples only. When creating rules for your own detector, you should use values that are appropriate based on your model, data and business.

  9. After you have created all three rules, choose Next.

    For more information about creating and writing rules, see Create a rule and Rule language reference.