GeneralizedPareto
- class GeneralizedPareto(location=None, scale=None, shape=None)[source]
Bases:
BaseSingleModel
Represents a Generalized Pareto distribution (GPD).
- __init__(location=None, scale=None, shape=None)[source]
Initialize an object.
- Parameters:
location (N x 1 numpy array, optional) – location of the distribution. The default is None.
scale (N x 1 numpy array, optional) – scale of the distribution. The default is None.
shape (N x 1 numpy array, optional) – shape of the distribution. The default is None.
- Return type:
None.
Methods
Initialize an object.
Multi-variate probability density function for this distribution.
Draw a sample from the current mixture model.
- pdf(x)[source]
Multi-variate probability density function for this distribution.
- Returns:
PDF value of the state x.
- Return type:
float
- sample(rng=None, num_samples=None)[source]
Draw a sample from the current mixture model.
- Parameters:
rng (numpy random generator, optional) – Random number generator to use. If none is given then the numpy default is used. The default is None.
- Returns:
randomly sampled numpy array of the same shape as the mean.
- Return type:
numpy array