scalib.preprocessing.QuantFitMethod#
- class scalib.preprocessing.QuantFitMethod(method, **kwargs)[source]#
Method for esimating the scale and shift parameters of Quantizer.
Methods
bounds([margin])Take the min and max of the training traces, fit such that the [min, max] range is mapped to a zero-centered interval covering a
1/marginfraction of the quantized domain: if the quantized domain is[-Q,Q],min` is mapped to ``-Q/marginandmaxis mapped toQ/margin.moment([nstd])Take the mean and standard deviation of the training traces, fit such that
mean-nstd*stdis mapped to -Q andmean+nstd*stdis mapped to Q, where [-Q, Q] is the quantized domain.- Parameters:
method (QFitMethod) –
- classmethod bounds(margin=4.0)[source]#
Take the min and max of the training traces, fit such that the [min, max] range is mapped to a zero-centered interval covering a
1/marginfraction of the quantized domain: if the quantized domain is[-Q,Q],min` is mapped to ``-Q/marginandmaxis mapped toQ/margin.