PairedGaussianPareto

class PairedGaussianPareto(location=None, scale=None, left_tail_shape=None, left_tail_scale=None, left_threshold=None, left_mean=None, left_sigma=None, right_tail_shape=None, right_tail_scale=None, right_threshold=None, right_mean=None, right_sigma=None)[source]

Bases: BaseSingleModel

Represents a Paired Gaussian-Pareto Mixture Distribution object.

left_tail_shape

GPD shape parameter (gamma) of the left tail. The default is None.

Type:

float

left_tail_scale

GPD scale parameter (beta) of the left tail. The default is None.

Type:

float

left_threshold

Location where the left tail meets the left Gaussian core region. The default is None.

Type:

float

left_mean

Mean of the left Gaussian core region. The default is None.

Type:

float

left_sigma

Standard deviation of the left Gaussian core region. The default is None.

Type:

float

right_tail_shape

GPD shape parameter (gamma) of the right tail. The default is None.

Type:

float

right_tail_scale

GPD scale parameter (beta) of the right tail. The default is None.

Type:

float

right_threshold

Location where the right tail meets the right Gaussian core region. The default is None.

Type:

float

right_mean

Mean of the right Gaussian core region. The default is None.

Type:

float

right_sigma

Standard deviation of the right Gaussian core region. The default is None.

Type:

float

__init__(location=None, scale=None, left_tail_shape=None, left_tail_scale=None, left_threshold=None, left_mean=None, left_sigma=None, right_tail_shape=None, right_tail_scale=None, right_threshold=None, right_mean=None, right_sigma=None)[source]

Initialize an object.

Parameters:
  • left_tail_shape (float) – Sets the class attribute of the same name

  • left_tail_scale (float) – Sets the class attribute of the same name

  • left_threshold (float) – Sets the class attribute of the same name

  • left_mean (float) – Sets the class attribute of the same name

  • left_sigma (float) – Sets the class attribute of the same name

  • right_tail_shape (float) – Sets the class attribute of the same name

  • right_tail_scale (float) – Sets the class attribute of the same name

  • right_threshold (float) – Sets the class attribute of the same name

  • right_mean (float) – Sets the class attribute of the same name

  • right_sigma (float) – Sets the class attribute of the same name

Return type:

None.

Methods

CDFplot

Plot the overbound and DKW bound(s) against ECDF of input data.

CI

Return confidence interval of distribution given a significance level 'alfa'.

__init__

Initialize an object.

pdf

Calculate the PDF value at the given point.

probscaleplot

Generate probability plot of the ECDF, overbound, and DKW bound(s).

sample

Generate a random sample from the distribution model.

CDFplot(data)[source]

Plot the overbound and DKW bound(s) against ECDF of input data.

Parameters:

data (N numpy array) – Contains the error sample data for which the overbound was computed.

Returns:

Shows empirical cumulative distribution function of input error data, the associated DKW bound(s), and the computed overbound in the CDF domain.

Return type:

matplotlib line plot

CI(alfa)[source]

Return confidence interval of distribution given a significance level ‘alfa’.

Parameters:

alfa (float) – significance level, i.e. confidence level = (1 - alfa). Must be a positive real number which is less than 1

Returns:

Numpy array containing the upper and lower bound of the computed confidence interval.

Return type:

1 x 2 numpy array

pdf(x)

Calculate the PDF value at the given point.

This should be implemented by the child class.

Parameters:

x (N x 1 numpy array) – Point to evaluate the PDF.

Returns:

PDF value.

Return type:

float

probscaleplot(data)[source]

Generate probability plot of the ECDF, overbound, and DKW bound(s).

Parameters:

data (N numpy array) – numpy array containing the error data used to calculate the overbound

Returns:

Shows empirical cumulative distribution function of input error data, the associated DKW bound(s), and the computed overbound in the CDF domain where the probability axis is represented with percentiles and is scaled such that a Gaussian CDF is linear.

Return type:

matplotlib line plot

sample(rng: rnd._generator = None, num_samples: int = None) np.ndarray[source]

Generate a random sample from the distribution model.

Parameters:

num_samples (int) – Specify the size of the sample.

Returns:

Numpy array containing a random sample of the specified size from the distribution.

Return type:

N numpy array