Custom metric configuration

Updated at:

Configure business metrics such as unique visitors (UV), click-through rate (CTR), purchase conversion rate (CVR), and average GMV per user from the experiment report source table. PAI-Rec also supports significance calculations for experiment comparisons at the user dimension (based on user count) or the sample dimension (based on sample count).

Configure metrics

Create a metric

Creating a metric requires a registration data table with completed data registration and field configuration, a metric name, and a recommendation scenario.

  1. Log in to the PAI-Rec console. In the left-side navigation pane, choose Metric management > Metric configuration.

  2. Create a base metric.

    1. In the Base metric section, click Create and configure the following metrics: PV, UV, click, click_UV, ctr_sample_v1, and ctr_user_v1.

      • PV (Page Views): Set Metric Definition to Page Views (PV), select field exposure_count. Formula: SUM(exposure_count).

      • UV (Unique Visitors): Set Metric Definition to Page Views (UV), select field user_id. Formula: COUNT(DISTINCT user_id).

      • click (Clicks): Set Metric Definition to Cumulative Value, select field click_count. Formula: SUM(click_count).

      • click_UV (Unique Clicking Visitors): Set Metric Definition to Conditional Count Template, select fields click_count and user_id. Formula: COUNT(DISTINCT IF(click_count>0, user_id, NULL)).

      • ctr_user_v1 (Significance by user dimension): Enable Calculate Significance and Calculate Metrics by User. Set the metric for user calculation to click_uv and the user field to user_id.

      • ctr_sample_v1 (Significance by sample dimension): Enable Calculate Significance, disable Calculate Metrics by User. Set numerator to click_uv and denominator to expr_pv.

    2. Click Save.

  3. Create a derived metric.

    1. In the Derived metric section, click Create and configure the uv_click_ctr metric.

      Set Metric name to uv_click_ctr, enter User click-through rate in the Description field, and select offline for Metric timeliness. In the Metric definition section, select click_UV, the division operator (/), and UV in sequence.

    2. Click Save.

Modify a metric

You can filter metrics by recommendation scenario and timeliness. To modify a metric, click Details next to the target metric, and then click Modify. Update the parameters as needed and click Save.

Calculate a metric

In the metric list, click Calculate on the right of the target metric. Set the time window and specific metrics, and then click OK to create a calculation task for the metric.

Delete a metric

In the metric list, click Delete on the right of the target metric.

Important

A deleted metric cannot be recovered. Proceed with caution.

Configure metric groups

Group multiple metrics within a scenario to perform batch operations such as metric calculation on the entire group.

Scheduled metric calculation

Each day, PAI-Rec dynamically assembles SQL statements based on your configured metrics. It reads data from the experiment report source table to calculate the metrics and stores the results in a specified Hologres table. For real-time metrics, the calculation job runs every 5 minutes.

image