Skip to content

Compare two runs' rankings: correlation, top-k overlap and biggest movers

GET
/v1/runs/compare
curl --request GET \
--url 'https://api.supposing.app/v1/runs/compare?a=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0&b=2489E9AD-2EE2-8E00-8EC9-32D5F69181C0'
a
required
A
string format: uuid
b
required
B
string format: uuid
top_k
Top K
Any of:
integer

Successful Response

Media typeapplication/json
RunComparison

How two rankings of the same items differ, e.g. two judges or two rubrics on one dataset.

object
a
required
A
string format: uuid
b
required
B
string format: uuid
summary
required
Summary
string
n_common_items
required
N Common Items

Items ranked in both runs; everything below uses only these.

integer
spearman
required
Spearman

Rank correlation, -1 to 1. 1 means the same order.

Any of:
number
kendall_tau
required
Kendall Tau

Share of item pairs in the same order, scaled to -1..1.

Any of:
number
top_k
required
Top K
integer
top_k_overlap
required
Top K Overlap

Share of run a’s top_k that is also in run b’s top_k.

Any of:
number
movers
required
Movers

Items whose rank changed most, biggest first, at most 25.

Array<object>
Mover
object
item_id
required
Item Id
string format: uuid
title
required
Title
Any of:
string
rank_a
required
Rank A
integer
rank_b
required
Rank B
integer
rank_change
required
Rank Change

Rank_a - rank_b: positive means the item placed higher in run b.

integer

Example generated

{
"a": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"b": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"summary": "example",
"n_common_items": 1,
"spearman": 1,
"kendall_tau": 1,
"top_k": 1,
"top_k_overlap": 1,
"movers": [
{
"item_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"title": "example",
"rank_a": 1,
"rank_b": 1,
"rank_change": 1
}
]
}

Client error. Branch on code; show message and hint.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
]
}

Server error.

Media typeapplication/json
Error

The body of every non-2xx response.

object
code
required
Code

Stable machine-readable code, e.g. dataset_not_found.

string
message
required
Message
string
hint
Hint

What to do next.

Any of:
string
details
Details

Per-field problems, for invalid_request.

Any of:
Array<object>
ErrorDetail
object
field
required
Field

Dotted path to the field, e.g. ranking.rubric.

string
message
required
Message
string

Example generated

{
"code": "example",
"message": "example",
"hint": "example",
"details": [
{
"field": "example",
"message": "example"
}
]
}