{"uid":"cap_eRLMZqYYVAoCHjDJV2Ka0","slug":"delx-commerce-expected-calibration-error-ece-calculator-d1e5516b","name":"Delx Commerce — Expected Calibration Error (ECE) Calculator","description":"Pay-per-result APIs for agents. No signup. Exact price. Verifiable delivery. USDC on Base + Solana via x402.","url":"https://commerce.delx.ai/api/v1/x402/calibration-ece?utm_source=zero.xyz","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_51lheABMdD9zdErZfaJvD","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 the Expected Calibration Error (ECE) of a set of binary forecast probabilities against observed outcomes, returning a calibration quality score.","exampleAgentPrompt":"Can you compute the Expected Calibration Error for my binary classifier? I have 10 bins, forecasts of [0.1, 0.4, 0.8, 0.9] and actual outcomes of [0, 0, 1, 1].","exampleUseCases":[{"title":"Evaluating weather forecast calibration","prompt":"I ran a weather prediction model and got probabilities [0.2, 0.5, 0.7, 0.9, 0.3] for rain events, and the actual outcomes were [0, 1, 1, 1, 0]. Can you calculate the Expected Calibration Error using 5 bins so I know how well-calibrated those forecasts are?"},{"title":"Auditing medical risk model reliability","prompt":"My patient risk model output probabilities [0.1, 0.6, 0.8, 0.4, 0.95] and the true binary outcomes were [0, 1, 1, 0, 1]. Compute the ECE with 10 bins — I need to verify this model is properly calibrated before deployment."},{"title":"Comparing classifier calibration before and after Platt scaling","prompt":"Before applying Platt scaling, my model produced forecasts [0.05, 0.3, 0.7, 0.95, 0.5] against outcomes [0, 0, 1, 1, 1]. Can you calculate the ECE with 5 bins so I can benchmark calibration improvement after scaling?"}],"resultDescription":"Returns a JSON object containing the ECE score (a float indicating average calibration error, lower is better), the number of samples (n) used in the calculation, and a schema identifier string (e.g. 'delx/util-calibration-ece/v1') for result provenance.","failureModes":["Mismatched array lengths between forecasts and outcomes will likely cause an error or undefined behavior","Forecast values outside [0,1] range are invalid inputs","Invalid bins value (e.g. zero or negative integer) may cause computation failure","Empty forecasts or outcomes arrays may return a null or error response","Network or payment processing failure may result in no response"],"whenToPreferThis":"Choose this endpoint when you need a quick, pay-per-call ECE computation without setting up your own calibration library or infrastructure. Ideal for AI agents that need on-demand probabilistic model evaluation as part of an automated ML pipeline, audit workflow, or model comparison task. At $0.001 USDC per call with no signup required, it is cost-effective for low-frequency or one-off calibration checks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:53:45.385Z","isFirstParty":false,"canonicalSlug":"delx-commerce-expected-calibration-error-ece-calculator-d1e5516b"}