improver.ensemble_copula_coupling._scipy_continuous_distns module

This module defines the truncnorm as per scipy v1.3.3 to overcome performance issue introduced in later versions: - https://github.com/scipy/scipy/issues/12370 - https://github.com/scipy/scipy/issues/12733

_norm_cdf(x)[source]
_norm_isf(q)[source]
_norm_logpdf(x)[source]
_norm_pdf(x)[source]
_norm_ppf(q)[source]
_norm_sf(x)[source]
class truncnorm_gen(momtype=1, a=None, b=None, xtol=1e-14, badvalue=None, name=None, longname=None, shapes=None, extradoc=None, seed=None)[source]

Bases: rv_continuous

A truncated normal continuous random variable.

%(before_notes)s

Notes

The standard form of this distribution is a standard normal truncated to the range [a, b] — notice that a and b are defined over the domain of the standard normal. To convert clip values for a specific mean and standard deviation, use:

a, b = (myclip_a - my_mean) / my_std, (myclip_b - my_mean) / my_std

truncnorm takes \(a\) and \(b\) as shape parameters.

%(after_notes)s

%(example)s

_argcheck(a, b)[source]

Default check for correct values on args and keywords.

Returns condition array of 1’s where arguments are correct and

0’s where they are not.

_cdf(x, a, b)[source]
_get_norms(a, b)[source]
_get_support(a, b)[source]

Return the support of the (unscaled, unshifted) distribution.

Must be overridden by distributions which have support dependent upon the shape parameters of the distribution. Any such override must not set or change any of the class members, as these members are shared amongst all instances of the distribution.

Parameters:
  • arg1 (array_like) – The shape parameter(s) for the distribution (see docstring of the instance object for more information).

  • arg2 (array_like) – The shape parameter(s) for the distribution (see docstring of the instance object for more information).

  • ... (array_like) – The shape parameter(s) for the distribution (see docstring of the instance object for more information).

Returns:

a, b – end-points of the distribution’s support for the specified shape parameters.

Return type:

numeric (float, or int or +/-np.inf)

_logpdf(x, a, b)[source]
_pdf(x, a, b)[source]
_ppf(q, a, b)[source]