statsmodels.distributions.bernstein.BernsteinDistribution#

class statsmodels.distributions.bernstein.BernsteinDistribution(cdf_grid)[source]#

Distribution based on Bernstein Polynomials on unit hypercube.

Parameters:
cdf_gridarray_like

cdf values on a equal spaced grid of the unit hypercube [0, 1]^d. The dimension of the arrays define how many random variables are included in the multivariate distribution.

Attributes:
cdf_gridndarray

Grid of cdf values.

prob_gridndarray

Grid of cell or bin probabilities.

k_dimint

Number of components, dimension of the random variable.

k_gridtuple of int

Shape of cdf_grid.

k_grid_productint

Total number of bins in the grid.

_grid_Grid

Instance with grid helper methods and attributes.

Methods

cdf(x)

cdf values evaluated at x.

from_data(data, k_bins)

Create distribution instance from data using histogram binning.

get_marginal(idx)

Get marginal BernsteinDistribution.

pdf(x)

pdf values evaluated at x.

rvs(nobs[, rng])

Generate random numbers from distribution.

Methods

cdf(x)

cdf values evaluated at x.

from_data(data, k_bins)

Create distribution instance from data using histogram binning.

get_marginal(idx)

Get marginal BernsteinDistribution.

pdf(x)

pdf values evaluated at x.

rvs(nobs[, rng])

Generate random numbers from distribution.

Properties