{"uid":"cap_wJdH52asfFQHaZNljMDN4","slug":"halowerk-iot-sensor-calibration-ols-linear-fit-0715d90e","name":"Halowerk IoT Sensor Calibration — OLS Linear Fit","description":"Fits reference = slope × observed + offset with ordinary least squares over paired caller-supplied readings. It reports residual diagnostics and does not claim traceability, uncertainty accreditation or suitability beyond the supplied calibration range.","url":"https://iot.halowerk.com/v1/sensor-calibration","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"observed":{"type":"array","items":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"maxItems":10000,"minItems":2},"reference":{"type":"array","items":{"type":"number","maximum":1000000000000,"minimum":-1000000000000},"maxItems":10000,"minItems":2}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_xsA3XYy23BceXeCgUEq-f","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Fits a linear calibration model (reference = slope × observed + offset) using ordinary least squares over paired sensor readings, returning slope, offset, and residual diagnostics.","exampleAgentPrompt":"Can you calibrate my temperature sensor by fitting a linear model to these observed readings [23.1, 24.5, 25.8, 27.2, 28.9] against the reference values [22.8, 24.0, 25.5, 26.9, 28.4]? I need the slope, offset, and residual diagnostics.","exampleUseCases":[{"title":"Temperature sensor drift correction","prompt":"My temperature sensor has been reading slightly off — I have 10 paired observed and reference readings I collected in the lab. Can you fit a linear calibration so I get the slope and offset to correct future readings, plus tell me how well the fit performs?"},{"title":"Pressure sensor factory calibration","prompt":"I need to calibrate our pressure sensors before shipping. Here are the observed sensor outputs [101.2, 200.5, 301.1, 399.8, 500.3] and the reference gauge pressures [100.0, 200.0, 300.0, 400.0, 500.0] — fit an OLS line and give me the calibration coefficients and residuals."},{"title":"Evaluating sensor linearity","prompt":"I want to check how linear my light sensor is across its range. I have paired observed and reference readings and need you to run an OLS fit and report the residual diagnostics so I can see if the sensor deviates significantly from linearity."}],"resultDescription":"Returns the fitted slope and offset (intercept) from the OLS regression, along with residual diagnostics such as per-point residuals, R-squared (coefficient of determination), and possibly root mean square error — indicating goodness of fit over the supplied calibration range.","failureModes":["Arrays of different lengths return a validation error","Fewer than 2 data points in either array triggers a minimum-items error","Perfectly collinear or constant observed values may cause a degenerate fit","Values outside ±1e12 are rejected by schema validation","Mismatched or non-numeric input types return a 400-level error"],"whenToPreferThis":"Choose this endpoint when you have paired observed and reference sensor measurements and need a simple, fast linear calibration (slope + offset) with residual diagnostics. It is ideal for IoT sensor correction workflows where a straight-line model is sufficient and you do not need certified traceability, uncertainty budgets, or non-linear fitting. Prefer alternatives if you need polynomial or multi-variable regression, or accredited calibration certificates.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:37:59.000Z","isFirstParty":false}