estimator.nd.CenteredBinomial

estimator.nd.CenteredBinomial#

class estimator.nd.CenteredBinomial(eta, n=None)[source]#

Sample a_1, …, a_η, b_1, …, b_η uniformly from {0, 1}, and return Σ(a_i - b_i).

EXAMPLE:

>>> from estimator import *
>>> ND.CenteredBinomial(8)
D(σ=2.00)
__call__(**kwargs)#

Call self as a function.

Methods

__init__(eta[, n])

resize(new_n)

Return an altered distribution having a dimension new_n.

support_size([fraction])

Compute the size of the support covering the probability given as fraction.

Attributes

bounds

hamming_weight

The number of non-zero coefficients in this distribution

is_Gaussian_like

is_bounded

Whether the value of coefficients are bounded

is_sparse

Whether the density of the distribution is < 1/2.

mean

n

stddev