Description
Return a value's bin-center error and relative-width ratio.
Quantization maps continuous values to a discrete representation under a scale, offset and rounding policy. Reconstructing a supplied integer or comparing a value with a bin center measures one local error; it does not determine a quantizer’s range, select rounding or measure a model’s accuracy.
Return a value's bin-center error and relative-width ratio.
When to use this tool
Use Quantization Bin Center Error when checking the supplied reconstruction or bin-center error convention.
How to use the tool and how it works
- Enter value, center, binWidth. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read error, relativeToWidth. Use the output convention below.
Return a value's bin-center error and relative-width ratio. Require binWidth > 0; error = value-center, relativeToWidth = error/binWidth.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| value | Value | Required. Finite number. |
| center | Center | Required. Finite number. |
| binWidth | Bin Width | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| error | Error | Required. Finite number. |
| relativeToWidth | Relative To Width | Required. Finite number. |
{
"input": {
"value": 1.2,
"center": 1,
"binWidth": 0.5
},
"output": {
"error": 0.19999999999999996,
"relativeToWidth": 0.3999999999999999
}
} Limitations and assumptions
- The center is supplied and value need not lie in that bin; no actual quantization, rounding or error bound is selected.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use the complete quantizer configuration and representative data for clipping, rounding, calibration and model-level error analysis.
References
Similar or alternative tools
- Quantization Zero Point Reconstruction Residual
Return affine quantization reconstruction and residual.
- Quantized Weight Zero Point Code
Subtract an explicit quantization zero point from an in-range integer weight code without estimating scale.