statsmodels.duration.hazard_regression.rv_discrete_float.rvs#
- rv_discrete_float.rvs(n=None, rng=None)[source]#
Returns a random sample from the discrete distribution
A vector is returned containing a single draw from each row of xk, using the probabilities of the corresponding row of pk
- Parameters:
- n
notused Present for signature compatibility.
- rng{
None,int,numpy.random.Generator,numpy.random.RandomState},optional If rng is None, a new
Generatoris created using fresh entropy from the operating system. If rng is an int, a newRandomStateinstance is created, seeded with rng; this integer-seeding behavior is deprecated and will change to creating aGeneratorin a future release. If rng is already aGeneratororRandomStateinstance, that instance is used.- random_state{
None,int, array_like[int],numpy.random.Generator,numpy.random.RandomState},optional Deprecated since version 0.15: random_state has been deprecated. In-line with SPEC-007, use rng for passing a random number generator or seed.
- n
- Returns:
ndarrayA vector containing one random draw for each row of xk.