5.3.6 Batch Framework for Sanctions Event Scoring

The following batches are available in the out-of-the-box for Sanctions Event Scoring (SES) framework:
  • SES_Aggregate_Events
  • SES_Scoring
  • SES_Annual_Model_Validation
  • SES_Monthly_Model_Validation
  • SES_Update_Event_Status

Figure 5-55 Define Batch for Sanctions Event Scoring



SES Aggregate Events
  • This pre-seeded batch will be available in all the workspaces (Production and Sandboxes).

    Note:

    This batch has to be executed in the Sandbox workspace.
  • This batch creates base features for sanctions event scoring training in the sandbox workspace.
Batch and Task parameters
The batch contains a single task named Aggregate_Events.

Figure 5-56 Define Task for Aggregate_Events



Task: Aggregate_Events, Task Parameters
  • Objective folder for this task:
    Home / Modeling / Pipelines / ML4AML / Sanctions Event Scoring / Batch /
    Aggregate Events
  • Optional Parameters:
    • from_date: Start date for Historic Data lookup in DD-Month-YYYY format.
    • to_date: End Date for Historic Data lookup in DD-Month-YYYY format.
    • prodFlag: Flag to indicate Training/Scoring scenario. The option is True or False. For sandbox/historic training scenarios, the prodFlag should be set to False.
    • is_aai_batch: This flag indicates whether the batch is called from the Sanctions application or from Compliance Studio. The default setting is True, indicating that the batch originates from the Sanctions application. Conversely, setting the flag to False signifies that the batch is called from Compliance Studio.
    • sanctions_batch_run_id: The batch run ID will be used when the is_aai_batch flag is set to False.

      For Example: from_date=01-Feb-2024,to_date=10-Feb-2024,prodFlag=False, is_aai_batch=True, sanctions_batch_run_id=SES_B1.

    • Edit Task Parameters and Save.

      Note:

      • Once the batch execution is successful, the results are available in the ML4AML_SES_EVENT_INPUT table. For more information on the table structure, see the OFS Compliance Studio Data Model Reference Guide.
      • You can view execution status of the batch in the ML4AML_SES_EXECUTION_STATUS table and if batch execution fails, you can view ML4AML_SES_EXECUTION_ERRORS table for debugging.
SES Scoring
This pre-seeded batch will be available in all workspaces (Production and Sandboxes).

Note:

This batch has to be executed in the Production workspace.

Batch and Task Parameters

The batch contains the following tasks:
Task 1: Aggregate_Events, Task Parameters
  • Objective folder for this task:
    Home / Modeling / Pipelines / ML4AML / Sanctions Event Scoring /Batch /
    Aggregate Events

    Note:

    Do not change any parameter, except Optional Parameters.
  • Optional Parameters:
    • prodFlag: Flag to indicate Training/Scoring scenario. The option is True or False. For production / scoring scenarios, the prodFlag should be set to True.
    • is_aai_batch: This flag indicates whether the batch is called from the Sanctions application or from Compliance Studio. The default setting is True, indicating that the batch originates from the Sanctions application. Conversely, setting the flag to False signifies that the batch is called from Compliance Studio.
    • sanctions_batch_run_id: The batch run id that will be used when the flag is_aai_batch is set to False. The value of V_BATCH_RUN_ID for this should be taken from cs_batch_run table corresponding to the D_MIS_DATE.

      For Example: prodFlag=True, is_aai_batch=True, sanctions_batch_run_id=SES_B1.

    • Edit Task Parameters and Save.

      Figure 5-59 Edit Task for Aggregate_Events



      Note:

      • Once the batch execution is successful, the results are available in the ML4AML_SES_EVENT_INPUT table. For more information on the table structure, see the OFS Compliance Studio Data Model Reference Guide.
      • You can view execution status of the batch in the ML4AML_SES_EXECUTION_STATUS table and if batch execution fails, you can view ML4AML_SES_EXECUTION_ERRORS table for debugging.
Task 2: ML_Scoring, Task Parameters
  • Objective folder for this task:
    Home / Modeling / Pipelines / ML4AML / Sanctions Event Scoring / Batch /
    Model

    Note:

    Do not change any parameter, except Optional Parameters.
  • Optional Parameters:
    • threshold: Input threshold or cutoff. Events will be created if the score of an entity exceeds the threshold.
    • debug_flag: It is used for debugging purpose. By default, it is False.
    • is_aai_batch: This flag indicates whether the batch is called from the Sanctions application or from Compliance Studio. The default setting is True, indicating that the batch originates from the Sanctions application. Conversely, setting the flag to False signifies that the batch is called from Compliance Studio.
    • sanctions_batch_run_id: The batch run id that will be used when the flag is_aai_batch is set to False. The value of V_BATCH_RUN_ID for this should be taken from cs_batch_run table corresponding to the D_MIS_DATE.

      For Example: threshold=0,debug_flag=False,is_aai_batch=True, sanctions_batch_run_id=SES_B1.

    • Edit Task Parameters and Save.

      Figure 5-60 Edit Task for Scoring



      Note:

      Once the batch execution is successful, the results are available in the ML4AML_SES_EVENT_SCORE and ML4AML_SES_EVENT_SCORE_DETAILS tables. For more information on these table structure, see the OFS Compliance Studio Data Model Reference Guide.
SES Annual Model Validation
  • This pre-seeded batch will be available in all workspaces (Production and Sandboxes).

    Note:

    This batch has to be executed in the Production workspace.
  • This batch shows ongoing model performance annually.

Batch and Task Parameters

The batch contains a single task named Annual_Model_Validation.

Figure 5-61 Annual Model Validation



Task: Annual_Model_validation, Task Parameters
  • Objective folder for this task:
    Home / Modeling / Pipelines / ML4AML / Sanctions Event Scoring / Batch /
    Monitoring / Annual

    Note:

    Do not change any parameter except Optional Parameters and this Optional Parameters can be edited from the Schedule Batch option.
  • Optional Parameters:
    • model_group_name: Name of the Model Groups for which the model has been trained. Example, LOB1.
    • from_date: Start Date for Historic Data lookup in DD-MM-YYYY format.
    • to_date: End Date for Historic Data lookup in DD-MM-YYYY format.
    • model_id_list: To use the deployed model, you need to pass the parameter as Deployed.

      For example: model_group_name=LOB1,model_id_list=Deployed,from_date=01-Jan- 2016,to_date=31-Dec-2017

    • Edit Task Parameters and Save.

      Figure 5-62 Edit Task for Annual Model Validation



      Note:

      The Annual Model Validation batch shows output metrics in the notebook only and it will not store in any of the data tables.
SES Monthly Model Validation
  • This pre-seeded batch will be available in all workspaces (Production and Sandboxes).

    Note:

    This batch has to be executed in the Production workspace.
  • This batch shows ongoing model drift analysis and data quality with respect to new data every month (monthly).

    Figure 5-63 Monthly Model Validation



Batch and Task Parameters

The batch contains a single task named Monthly_Model_Validation.

Task: Monthly_Model_Validation, Task Parameters
  • Objective folder for Data Quality:
    Home / Modeling / Pipelines / ML4AML / Sanctions Event Scoring / Batch /
    Monitoring / Monthly / Data Quality
  • Objective folder for Drift Analysis:
    Home / Modeling / Pipelines / ML4AML / Sanctions Event Scoring / Batch /
    Monitoring / Monthly / Drift Analysis

    Figure 5-64 Monthly Model Validation



    Note:

    Do not change any parameter except Optional Parameters and this Optional Parameters can be edited from the Schedule Batch option.
  • Optional Parameters:
    • model_group_name: Name of the Model Groups for which the model has been trained. Example: LOB1.
    • from_date: Start Date for Historic Data lookup in DD-MM-YYYY format.
    • to_date: End Date for Historic Data lookup in DD-MM-YYYY format.
    • model_id: To use the deployed model, you need to pass the parameter as Deployed.
    • FEATURE_INCLUDE: List of features to be included for data quality. The default value is None which means it includes everything.
    • FEATURE_EXCLUDE: List of features to be excluded for data quality. The default value is None which means it excludes nothing.
    • Number_Of_Bins: Number of bins to be used in discretizing (scalar). The default value is 9.
    • Boot_Strap_Samples: Number of bootstrap samples to estimate thresholds. The default value is 5.
    • Standard_Deviation_Band_Sigma: Number of standard deviation bands (sigma band) for threshold setting to be used. The default value is 2 sigma.

      For example:

      model_group_name=LOB1,from_date=01-Jan-2016,to_date=31-Dec-2017, model_id=Deployed,Number_Of_Bins=9,Boot_Strap_Samples=5,Standard_Deviation_Band _Sigma=2,FEATURE_INCLUDE=None,FEATURE_EXCLUDE=None

  • Edit Task Parameters and Save.

    Figure 5-65 Edit Task for Monthly Model Validation



    Note:

    The Monthly Model Validation batch shows output metrics in the notebook only and it will not store in any of the data tables.
SES Update Event Status
  • This pre-seeded batch will be available in all workspaces (Production and Sandboxes).
  • This batch is used to update the Event Status in the ML4AML_SES_EVENT_INPUT table.

Batch and Task Parameters

The batch contains a single task named Update_Event_Status.

Figure 5-66 Update Event Status



Task: Sanctions Event Scoring Update Event Status, Task Parameters
  • Objective folder for this task:
    Home / Modeling / Pipelines / ML4AML / Sanctions Event Scoring / Batch /
    Update Event Status

    Note:

    Do not change any parameter except Optional Parameters and this Optional Parameters can be edited from the Schedule Batch option.
  • Optional Parameters:
    • mode: Name of the mode which can be either FILE when user uploads the CSV file or DEFAULT which internally updates the event status.

      Note:

      By default, it is set to mode=DEFAULT. If you are using mode=FILE, then execute batch using this Update Event Status from CSV File section.
    • from_date: Start Date for Historic Data lookup in DD-MM-YYYY format.
    • to_date: End Date for Historic Data lookup in DD-MM-YYYY format.

      For example: mode=DEFAULT,from_date=01-Jan-2020,to_date=31-Dec-2020

    • Edit Task Parameters and Save.

      Figure 5-67 Edit Task for Update Event Status



      Note:

      • Once the batch execution is successful, the results are available in the ML4AML_SES_EVENT_INPUT table. For more information on the table structure, see the OFS Compliance Studio Data Model Reference Guide.
      • You can view execution status of the batch in the ML4AML_SES_EXECUTION_STATUS table and if batch execution fails, you can view ML4AML_SES_EXECUTION_ERRORS table for debugging.

Update Event Status from CSV File

For loading data using a CSV file, the SES_UPDATE_EVENT_STATUS batch should be executed using the following parameters:
  • mode: Name of the mode which can be either FILE when user uploads the CSV file or DEFAULT which internally updates the event status.
  • from_date: Start Date for Historic Data lookup in DD-MM-YYYY format.
  • to_date: End Date for Historic Data lookup in DD-MM-YYYY format.
  • batch_size: It reads data in the corresponding batch size from the CSV file.

For example: mode=FILE, from_date=01-Jan-2020, to_date=31-Dec-2024,batch_size=52

A sample CSV is shipped with Compliance Studio and named as sar_p.csv in the <COMPLIANCE_STUDIO_INSTALLATION_PATH>/deployed/ml4aml/demodata/sar_p.csv directory.

This sample CSV is shipped with headers and two sample rows showing the format of each column.

Figure 5-68 Snapshot of sar_p.csv



When running the SES_UPDATE_EVENT_STATUS batch with mode = FILE, the user should ensure that the following columns are available with the required values in the CSV files:
  • N_ALERT_ID: The Alert/Event ID for the event to be updated.
  • V_STATUS_CODE: Indicates status as True / False Positive Events. The available options are:
    • 1: Indicates the True Positive Events
    • 0: Indicates the False Positive Events
    • None: If Event is neither 1 nor 0, then it is categorized as None.
  • FIC_MIS_DATE: The date on which event is generated. The format should be DD-Mon-YYYY.

    Note:

    • In the CSV file, the user is expected to populate non-Null data for all the columns except V_STATUS_CODE.
    • Once the batch execution is successful, the results are available in the ML4AML_SES_EVENT_INPUT table. For more information on the table structure, see the OFS Compliance Studio Data Model Reference Guide