{"uid":"cap_DsMfivrtv0IKWM8Hu0TRg","slug":"delx-calibration-ece-c4b8d2bf","name":"Delx Calibration ECE","description":"Expected calibration error from forecast/outcome pairs. Call when scoring probability model calibration offline. Returns ece and n as deterministic JSON for $0.001 USDC via x402 on Base. First-party local math only—no RPC, live market feed, API keys, storage, or mediagen. Advisory only; the caller owns capital, risk, and production controls.","url":"https://api.delx.ai/api/v1/x402/calibration-ece","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"bins":{"type":"integer","description":"Number of calibration bins"},"outcomes":{"type":"array","description":"Binary outcomes 0/1 aligned with forecasts"},"forecasts":{"type":"array","description":"Forecast probabilities in [0,1]"}}},"responseSchema":{"type":"json","example":{"n":4,"ece":0.225,"schema":"delx/util-calibration-ece/v1"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_zv1PCFdPaxzNxct3fBEYy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes Expected Calibration Error (ECE) from forecast probabilities and binary outcomes to measure probabilistic model calibration quality.","exampleAgentPrompt":"Calculate the expected calibration error for these 5 forecasts [0.1, 0.4, 0.6, 0.8, 0.9] against outcomes [0, 0, 1, 1, 1] using 5 calibration bins.","exampleUseCases":[{"title":"Evaluate classifier confidence calibration","prompt":"I have a binary classifier and I want to check how calibrated it is — my predicted probabilities are [0.2, 0.5, 0.7, 0.9, 0.3] and the actual outcomes were [0, 1, 1, 1, 0]. Can you compute the ECE using 5 bins?"},{"title":"Audit weather forecast reliability","prompt":"I have a set of rain probability forecasts [0.1, 0.3, 0.6, 0.8, 0.95, 0.4] and whether it actually rained [0, 0, 1, 1, 1, 0]. Measure how well-calibrated those forecasts are using 10 bins."},{"title":"Compare model calibration before and after Platt scaling","prompt":"After applying Platt scaling my recalibrated probabilities are [0.15, 0.45, 0.65, 0.85, 0.5] and the true labels are [0, 0, 1, 1, 1]. Can you compute the ECE with 5 bins so I can see if calibration improved?"}],"resultDescription":"Returns a JSON object containing the ECE score (a float indicating mean calibration error across bins), the total number of samples evaluated (n), and a schema identifier string (e.g. 'delx/util-calibration-ece/v1') for versioning and provenance tracking.","failureModes":["Mismatched array lengths between forecasts and outcomes returns a validation error","Forecast probabilities outside [0,1] range cause schema rejection","Zero bins or negative bin count results in a bad request error","Empty forecast/outcome arrays may return ECE of 0 or an error","Non-binary values in outcomes array (anything other than 0 or 1) may cause incorrect results or errors"],"whenToPreferThis":"Use this endpoint when you need a fast, pay-per-call ECE computation without standing up your own calibration library, especially within agent workflows that already use the Delx utility ecosystem. Prefer it over implementing ECE manually when you need a stateless, versioned, auditable calibration measurement that integrates cleanly into automated pipelines.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T06:42:49.985Z","isFirstParty":false}