get_event_prediction
async
¶
get_event_prediction(
detector_id: string,
event_id: string,
event_type_name: string,
entities: listOfEntities,
event_timestamp: utcTimestampISO8601,
event_variables: EventVariableMap,
*,
config_overrides: Optional[AsyncFraudDetectorClientConfig] = None,
detector_version_id: Optional[wholeNumberVersionString] = None,
external_model_endpoint_data_blobs: Optional[
ExternalModelEndpointDataBlobMap
] = None,
) -> GetEventPredictionResult
Evaluates an event against a detector version. If a version ID is not provided, the detector’s (ACTIVE) version is used.
Parameters:
-
detector_id(string) –The detector ID.
-
detector_version_id(Optional[wholeNumberVersionString], default:None) –The detector version ID.
-
event_id(string) –The unique ID used to identify the event.
-
event_type_name(string) –The event type associated with the detector specified for the prediction.
-
entities(listOfEntities) –The entity type (associated with the detector's event type) and specific entity ID representing who performed the event. If an entity id is not available, use "UNKNOWN."
-
event_timestamp(utcTimestampISO8601) –Timestamp that defines when the event under evaluation occurred. The timestamp must be specified using ISO 8601 standard in UTC.
-
event_variables(EventVariableMap) –Names of the event type's variables you defined in Amazon Fraud Detector to represent data elements and their corresponding values for the event you are sending for evaluation.
You must provide at least one eventVariable
To ensure most accurate fraud prediction and to simplify your data preparation, Amazon Fraud Detector will replace all missing variables or values as follows:
For Amazon Fraud Detector trained models:
If a null value is provided explicitly for a variable or if a variable is missing, model will replace the null value or the missing variable (no variable name in the eventVariables map) with calculated default mean/medians for numeric variables and with special values for categorical variables.
For imported SageMaker models:
If a null value is provided explicitly for a variable, the model and rules will use “null” as the value. If a variable is not provided (no variable name in the eventVariables map), model and rules will use the default value that is provided for the variable.
-
external_model_endpoint_data_blobs(Optional[ExternalModelEndpointDataBlobMap], default:None) –The Amazon SageMaker model endpoint input data blobs.
Raises:
-
AccessDeniedException–An exception indicating Amazon Fraud Detector does not have the needed permissions. This can occur if you submit a request, such as
PutExternalModel, that specifies a role that is not in your account. -
ConflictException–An exception indicating there was a conflict during a delete operation.
-
InternalServerException–An exception indicating an internal server error.
-
ResourceNotFoundException–An exception indicating the specified resource was not found.
-
ResourceUnavailableException–An exception indicating that the attached customer-owned (external) model threw an exception when Amazon Fraud Detector invoked the model.
-
ThrottlingException–An exception indicating a throttling error.
-
ValidationException–An exception indicating a specified value is not allowed.
-
UnknownServiceError–The service returned an error code this client does not model.
Source code in docs_src/capo_frauddetector/_services/async_fraud_detector.py
2633 2634 2635 2636 2637 2638 2639 2640 2641 2642 2643 2644 2645 2646 2647 2648 2649 2650 2651 2652 2653 2654 2655 2656 2657 2658 2659 2660 2661 2662 2663 2664 2665 2666 2667 2668 2669 2670 2671 2672 2673 2674 2675 2676 2677 2678 2679 2680 2681 2682 2683 2684 2685 2686 2687 2688 2689 2690 2691 2692 2693 2694 2695 2696 2697 2698 2699 2700 2701 2702 2703 2704 2705 2706 2707 2708 2709 2710 2711 2712 2713 2714 2715 2716 2717 2718 2719 2720 2721 2722 2723 2724 2725 2726 | |