estimator.nd.NoiseDistribution#
- class estimator.nd.NoiseDistribution(n: int | None = None, mean: float = 0, stddev: float = 0, bounds: tuple = (<MagicMock name='mock.__neg__()' id='139484887014704'>, <MagicMock id='139484886902720'>), is_Gaussian_like: bool = False, _density: float = 1.0)[source]#
All noise distributions are instances of this class. It is recommended to pick one of the following available implementations below: - DiscreteGaussian - DiscreteGaussianAlpha - CenteredBinomial - Uniform - UniformMod - SparseTernary - SparseBinary - Binary - Ternary
NOTE: Generally, to generate an LWE parameter you call one of the above for the secret and error, without specifying the dimension n and m for secret/error respectively! These are initialized, when constructing the LWEParameters object.
- __call__(**kwargs)#
Call self as a function.
Methods
__init__([n, mean, stddev, bounds, ...])resize(new_n)Return an altered distribution having a dimension new_n.
support_size([fraction])Attributes
The number of non-zero coefficients in this distribution
Whether the value of coefficients are bounded
Whether the density of the distribution is < 1/2.