mxnet.np.random.pareto¶
-
pareto
(a, size=None, device=None, out=None)¶ Draw samples from a Pareto II or Lomax distribution with specified shape a.
- Parameters
a (float or array_like of floats) – Shape of the distribution. Must be > 0.
size (int or tuple of ints, optional) – Output shape. If the given shape is, e.g.,
(m, n, k)
, thenm * n * k
samples are drawn. If size isNone
(default), a single value is returned ifa
is a scalar. Otherwise,np.array(a).size
samples are drawn.
- Returns
out – Drawn samples from the Pareto distribution.
- Return type
ndarray or scalar
Examples
>>> np.random.pareto(a=5) array(0.12749612) >>> mx.numpy.random.pareto(a=5, size=[2,3]) array([[0.06933999, 0.0344373 , 0.10654891], [0.0311172 , 0.12911797, 0.03370714]]) >>> np.random.pareto(a=np.array([2,3]) array([0.26636696, 0.15685666]) The probability density for the Pareto distribution is f(x) = \frac{am^a}{x^{a+1}} where a is the shape and m the scale. Here m is assumed 1. The Pareto distribution is a power law distribution. Pareto created it to describe the wealth in the economy.
Did this page help you?
Yes
No
Thanks for your feedback!