{ } Raw JSON

bundles / scipy latest / scipy / stats / _distribution_infrastructure / _Parameter / draw

function

scipy.stats._distribution_infrastructure:_Parameter.draw

source: /scipy/stats/_distribution_infrastructure.py :614

Signature

def   draw ( self size = None * rng = None region = domain proportions = None parameter_values = None )

Summary

Draw random values of the parameter for use in testing.

Parameters

size : tuple of ints

The shape of the array of valid values to be drawn.

rng : np.Generator

The Generator used for drawing random values.

region : str

The region of the _Parameter from which to draw. Default is "domain" (the full domain); alternative is "typical". An enhancement would give a way to interpolate between the two.

proportions : tuple of numbers

A tuple of four non-negative numbers that indicate the expected relative proportion of elements that:

  • are strictly within the domain,

  • are at one of the two endpoints,

  • are strictly outside the domain, and

  • are NaN,

respectively. Default is (1, 0, 0, 0). The number of elements in each category is drawn from the multinomial distribution with np.prod(size) as the number of trials and proportions as the event probabilities. The values in proportions are automatically normalized to sum to 1.

parameter_values : dict

Map between the names of parameters (that define the endpoints of typical) and numerical values (arrays).

Aliases

  • scipy.stats._distribution_infrastructure._Parameter.draw