dask 2021.10.0

ParametersReturns
beta(self, a, b, size=None, chunks='auto', **kwargs)

This docstring was copied from numpy.random.mtrand.RandomState.beta.

Some inconsistencies with the Dask version may exist.

The Beta distribution is a special case of the Dirichlet distribution, and is related to the Gamma distribution. It has the probability distribution function

$$f(x; a,b) = \frac{1}{B(\alpha, \beta)} x^{\alpha - 1}(1 - x)^{\beta - 1},$$

where the normalization, B, is the beta function,

$$B(\alpha, \beta) = \int_0^1 t^{\alpha - 1}(1 - t)^{\beta - 1} dt.$$

It is often seen in Bayesian inference and order statistics.

note

New code should use the beta method of a default_rng() instance instead; please see the :None:ref:`random-quick-start`.

Parameters

a : float or array_like of floats

Alpha, positive (>0).

b : float or array_like of floats

Beta, positive (>0).

size : int or tuple of ints, optional

Output shape. If the given shape is, e.g., (m, n, k) , then m * n * k samples are drawn. If size is None (default), a single value is returned if a and b are both scalars. Otherwise, np.broadcast(a, b).size samples are drawn.

Returns

out : ndarray or scalar

Drawn samples from the parameterized beta distribution.

Draw samples from a Beta distribution.

See Also

Generator.beta

which should be used for new code.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /dask/array/random.py#192
type: <class 'function'>
Commit: