logistic(self, loc=0.0, scale=1.0, size=None, chunks='auto', **kwargs)
This docstring was copied from numpy.random.mtrand.RandomState.logistic.
Some inconsistencies with the Dask version may exist.
Samples are drawn from a logistic distribution with specified parameters, loc (location or mean, also median), and scale (>0).
New code should use the logistic
method of a default_rng()
instance instead; please see the :None:ref:`random-quick-start`
.
The probability density for the Logistic distribution is
$$P(x) = P(x) = \frac{e^{-(x-\mu)/s}}{s(1+e^{-(x-\mu)/s})^2},$$where $\mu$ = location and $s$ = scale.
The Logistic distribution is used in Extreme Value problems where it can act as a mixture of Gumbel distributions, in Epidemiology, and by the World Chess Federation (FIDE) where it is used in the Elo ranking system, assuming the performance of each player is a logistically distributed random variable.
Parameter of the distribution. Default is 0.
Parameter of the distribution. Must be non-negative. Default is 1.
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 loc
and scale
are both scalars. Otherwise, np.broadcast(loc, scale).size
samples are drawn.
Drawn samples from the parameterized logistic distribution.
Draw samples from a logistic distribution.
Generator.logistic
which should be used for new code.
scipy.stats.logistic
probability density function, distribution or cumulative density function, etc.
Draw samples from the distribution:
This example is valid syntax, but we were not able to check execution>>> loc, scale = 10, 1 # doctest: +SKIP
... s = np.random.logistic(loc, scale, 10000) # doctest: +SKIP
... import matplotlib.pyplot as plt # doctest: +SKIP
... count, bins, ignored = plt.hist(s, bins=50) # doctest: +SKIP
# plot against distribution
This example is valid syntax, but we were not able to check execution>>> def logist(x, loc, scale): # doctest: +SKIPSee :
... return np.exp((loc-x)/scale)/(scale*(1+np.exp((loc-x)/scale))**2)
... lgst_val = logist(bins, loc, scale) # doctest: +SKIP
... plt.plot(bins, lgst_val * count.max() / lgst_val.max()) # doctest: +SKIP
... plt.show() # doctest: +SKIP
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