Skip to main content
GET
Recommend a threshold for a precision or recall target

Authorizations

Authorization
string
header
required

An organization API key. Keys carry a role (read_write or read_only) and may be restricted to a namespace prefix such as acme/*, or to one namespace such as acme/prod/tenant_1. A prefix matches on a / boundary: acme/prod/tenant_1* covers acme/prod/tenant_1 and everything under acme/prod/tenant_1/, never acme/prod/tenant_12.

Path Parameters

ns
string
required

A namespace name, or a template prefix ending in /* (§7.7), with any / sent as %2F: acme%2Fprod%2Ftenant_123 or acme%2Fprod%2F*.

A namespace name, or a template prefix: a namespace path ending in /*, such as acme/prod/*, which every namespace under acme/prod/ inherits judgments from (§7.7). Up to 256 bytes.

Required string length: 1 - 256
Pattern: ^[A-Za-z0-9._:/-]+(/\*)?$
name
string
required

A judgment, attribute or threshold name. Names are path segments in field references, so they never contain ..

Required string length: 1 - 128
Pattern: ^[A-Za-z0-9_-]+$

Query Parameters

target
string
required

The metric and the value to meet, such as precision:0.9 or recall:0.8. A metric and the value to meet, such as precision:0.9 or recall:0.8.

Pattern: ^(precision|recall):(0?\.[0-9]*[1-9][0-9]*|1|1\.0+)$
option
string

Required for a choice judgment, and refused for a bool one. The option the threshold is for, such as fraud.

Minimum string length: 1

Response

A recommendation, an unreachable target, or too few outcomes; status says which.

Apply threshold with the judgment PATCH: {"escalate": threshold} for a bool judgment, {"fraud": {"value": option, "gte": threshold}} for a choice.

status
any
required
threshold
number
required

The threshold on the raw value, one of the curve's points.

Required range: 0 <= x <= 1
precision
number
required

Precision on these outcomes at the threshold.

Required range: 0 <= x <= 1
recall
number
required

Recall on these outcomes at the threshold.

Required range: 0 <= x <= 1
interval
object
required

The 95% interval of the targeted metric at the threshold.

outcomes
integer<int64>
required

The number of outcomes the recommendation rests on.

Required range: x >= 100
from_previous_epoch
boolean
required

True when the current engine epoch has fewer than 100 outcomes and the previous epoch's were used.

curve
object[]
required

Precision and recall at each threshold from 0.00 to 1.00 in steps of 0.01, lowest first: 101 points.

Maximum array length: 101