comnum.theory_quantization_mse#
- comnum.theory_quantization_mse(bits, full_scale, sigma=1.0)#
The exact mean squared error of a uniform mid-rise quantiser of
bitsbits and full scalefull_scalefor a Gaussian input of standard deviationsigma(one dimension): granular and overload (clipping) noise together.- Parameters:
- Returns:
the mean squared error.
- Return type:
- Raises:
ValueError – for an invalid parameter (the message names it).
Examples
>>> import comnum >>> round(comnum.theory_quantization_mse(2, comnum.optimal_loading(2)), 4) 0.1188