4.3.1.1.4. statsmodels.duration.hazard_regression.rv_discrete_float¶
-
class
statsmodels.duration.hazard_regression.
rv_discrete_float
(xk, pk)[source]¶ A class representing a collection of discrete distributions.
Parameters: xk : 2d array-like
The support points, should be non-decreasing within each row.
pk : 2d array-like
The probabilities, should sum to one within each row.
Notes
Each row of xk, and the corresponding row of pk describe a discrete distribution.
xk and pk should both be two-dimensional ndarrays. Each row of pk should sum to 1.
This class is used as a substitute for scipy.distributions. rv_discrete, since that class does not allow non-integer support points, or vectorized operations.
Only a limited number of methods are implemented here compared to the other scipy distribution classes.
4.3.1.1.4.1. Methods¶
__init__ (xk, pk) |
|
mean () |
Returns a vector containing the mean values of the discrete distributions. |
rvs () |
Returns a random sample from the discrete distribution. |
std () |
Returns a vector containing the standard deviations of the discrete distributions. |
var () |
Returns a vector containing the variances of the discrete distributions. |