Publishing Ranking Events
Last updated
Was this helpful?
Last updated
Was this helpful?
A ranking machine learning model orders items based on their relevance to a specific query or context. Unlike classification or regression models that predict absolute values, ranking models focus on relative ordering between items.
Before publishing ranking model events to Fiddler, format them in a grouped format. This means items returned for the same query ID (specified by the group_by parameter in ) appear in a single row with values stored as lists.
Example of correctly grouped format:
101
[134.77,180.74,159.80]
[5.0,2.5,4.5]
[...]
[1.97, 0.84,-0.69]
[1,0,0]
...
...
...
...
...
112
[26.00,51.00,205.11,73.2]
[3.0,4.5,2.0,1.0]
[...]
[10.75,8.41,-0.23,-3.2]
[0,1,0,0]
In this example, srch_id
is the group_by
column, and all other columns contain lists corresponding to each group.
If your data is in a flat CSV file (one item per row), use Fiddler's utility function to convert it to the required grouped format:
After preparing your grouped data, publish it to Fiddler:
You can update existing ranking events while maintaining the same grouped format.
To update the ground truth labels (called 'target values' in Fiddler), create a dataframe with the required updates while keeping the grouped format.
Call model.publish() with update set to true:
The group_by_col
argument should match the column specified in the group_by
parameter of your object.
Fiddler will update only the columns included in your modified dataframe while preserving all other data. Event update behavior is described in more detail in the guide.
Need help? Contact us at .