Sensor Calibration Fit
Paste or open a CSV of raw sensor readings and known reference values. Mark each pair train or check before fitting so check values never influence the coefficients. A stable scaled linear or quadratic least-squares model maps measured → reference. Compare training and held-out residuals, then test a new reading. This is exploratory calibration analysis, not instrument certification.
Key features
- Strict local CSV with explicit measured, reference and train/check roles
- Centered/scaled degree-1 or degree-2 least-squares fit using reorthogonalized QR
- Separate training and held-out RMSE, MAE, bias and per-record signed residuals
- Measured training range and warnings for check or requested readings outside it
- Approximate ±2σ model-only prediction spread with leverage and residual degrees of freedom
- Download a residual CSV and a reproducible model-and-diagnostics JSON
How to use
- Paste a CSV or open a local CSV file with measured,reference,role columns and at least two check rows.
- Assign training and check roles before fitting, then choose a linear or quadratic model.
- Enter a new sensor reading and press Fit and validate.
- Read the scaled coefficient formula, training range, separate train/check metrics and each signed residual.
- Review the extrapolation and uncertainty notes, then download residual CSV or model JSON.
Use cases
- Fit a bench sensor reading to a reference instrument's values
- Compare straight-line and curved fits against untouched check standards
- See whether one reading lies beyond the measured calibration range
- Keep coefficients and row-level residual evidence with an experiment record
Frequently asked questions
Which direction is calibrated?
The model predicts reference from measured: reference ≈ Σ c[k] z^k with z=(measured−center)/scale. Units remain whatever you used in the CSV; no unit conversion is inferred.
Why are check rows required?
They are never used to estimate coefficients or the training residual standard deviation. Their separate error measures help reveal model mismatch on values reserved before fitting. You choose the split; this tool cannot prove the check set is representative.
Is ±2σ a certified 95% interval?
No. It is an approximate model-only spread, 2 times training residual standard deviation times sqrt(1+leverage). It assumes independent, similar-variance residuals and omits reference-standard uncertainty, sensor repeatability, drift and systematic error. Zero fitted residuals do not establish zero physical uncertainty.
Can I use predictions outside the training range?
The tool shows them with an extrapolation warning, but does not validate their physical accuracy. Collect reference points over the intended range instead.
Why is a polynomial rejected as rank deficient?
Too few distinct measured values or nearly dependent columns cannot determine stable coefficients. Add well-spaced training pairs; a quadratic also needs more independent values than a line.
Are calibration values uploaded?
No. CSV parsing, fitting, plotting and requested downloads run in this browser tab.
Privacy
Your measured and reference pairs stay in this browser tab. Files are read locally and exported only when you request them; no server computation is used.
Comments & questions