# Return Reason Confidence Calibration Bins

> Return Reason Confidence Calibration Bins is a paid API for AI agents from market.datapackvibe.com, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-12).

Computes confidence calibration bins for a return-reason classifier, given up to 200 labelled records with predicted probabilities and actual labels.

## Facts

- Endpoint: POST https://market.datapackvibe.com/x402/assistant-sector-ml-return-reason-calibration?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-12
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/return-reason-confidence-calibration-bins-452820fb
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_xKdI5Tfly7Eg16HQpI5ET

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability return-reason-confidence-calibration-bins-452820fb -d '<json body>'
```

Example prompt: I have 150 labelled return records with actual labels (damaged, wrong_item, unwanted, other), predicted labels, and the 4-class probability arrays from my classifier — can you run confidence calibration binning on them so I can see how well the predicted probabilities match reality?

## When to prefer this

Use this endpoint when you need lightweight, pay-per-call confidence calibration bin computation for a return-reason classifier without standing up any infrastructure. It is purpose-built for the four return-reason classes (damaged, wrong_item, unwanted, other) and accepts up to 200 records with predicted probabilities, making it ideal for spot evaluation during model development or A/B testing. Prefer it over general-purpose ML platforms when you need a fast, cheap, bounded calibration check with no model hosting or training overhead.

## Known failure modes

- Fewer than the minimum required records supplied — endpoint may return an error or degenerate bin output
- Probability arrays not summing to 1 or containing values outside [0,1] — validation error
- More than 200 records supplied — truncated or rejected input
- Mismatched enum values in actual/predicted fields — schema validation failure
- All records belonging to a single class — bins for minority classes may be empty or undefined

## How this service works

Return reason - Confidence calibration bins: Confidence calibration bins for Return reason. Up to 200 supplied labelled text records. Local dataset tools, evaluation and small naive-Bayes baselines; no hosted model or foundation-model training. One of 25 profiles or calculations across 20 shared operations in this sector. 0.01 USDC includes one bounded confidence calibration bins deliverable.

## Output

A confidence calibration bins deliverable: the supplied records are grouped into probability bins and the endpoint returns bin-level statistics showing how predicted confidence scores align with observed accuracy, enabling reliability diagram construction and calibration diagnosis for the four return-reason classes (damaged, wrong_item, unwanted, other).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "records": {
   "type": "array",
   "items": {
    "type": "object",
    "required": [
     "id",
     "text",
     "actual",
     "predicted",
     "probabilities"
    ],
    "properties": {
     "id": {
      "type": "string",
      "default": "",
      "maxLength": 80,
      "minLength": 1
     },
     "text": {
      "type": "string",
      "default": "",
      "maxLength": 1000
     },
     "actual": {
      "enum": [
       "damaged",
       "wrong_item",
       "unwanted",
       "other"
      ],
      "type": "string"
     },
     "predicted": {
      "enum": [
       "damaged",
       "wrong_item",
       "unwanted",
       "other"
      ],
      "type": "string"
     },
     "probabilities": {
      "type": "array",
      "items": {
       "type": "number",
       "default": 0,
       "maximum": 1,
       "minimum": 0
      },
      "default": [],
      "maxItems": 4,
      "minItems": 4
     }
    },
    "additionalProperties": false
   },
   "default": [
    {
     "id": "example-0-0",
     "text": "damaged sample document number 0 for this supplied dataset.",
     "actual": "damaged",
     "predicted": "damaged",
     "probabilities": [
      0.8,
      0.06666666666666667,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-0-1",
     "text": "damaged sample document number 1 for this supplied dataset.",
     "actual": "damaged",
     "predicted": "damaged",
     "probabilities": [
      0.8,
      0.06666666666666667,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-0-2",
     "text": "damaged sample document number 2 for this supplied dataset.",
     "actual": "damaged",
     "predicted": "damaged",
     "probabilities": [
      0.8,
      0.06666666666666667,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-1-0",
     "text": "wrong_item sample document number 0 for this supplied dataset.",
     "actual": "wrong_item",
     "predicted": "wrong_item",
     "probabilities": [
      0.06666666666666667,
      0.8,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
    {
     "id": "example-1-1",
     "text": "wrong_item sample document number 1 for this supplied dataset.",
     "actual": "wrong_item",
     "predicted": "wrong_item",
     "probabilities": [
      0.06666666666666667,
      0.8,
      0.06666666666666667,
      0.06666666666666667
     ]
    },
 
… (truncated)
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/return-reason-confidence-calibration-bins-452820fb/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from market.datapackvibe.com](https://www.zero.xyz/host/market.datapackvibe.com/llms.txt)
