pystra.distributions.normal.Normal#

class Normal(name, mean, stdv, input_type=None, startpoint=None)[source]#

Bases: Distribution

Normal distribution

Attributes:
  • name (str): Name of the random variable

  • mean (float): Mean

  • stdv (float): Standard deviation

  • input_type (any): Change meaning of mean and stdv

  • startpoint (float): Start point for seach

Note: while we could use SciPy norm distribution here, there is a substantial perfromance hit, so use local implementation.

Leave initialization to the base class

Methods

cdf

cumulative distribution function

getMean

getName

getStartPoint

getStdv

jacobian

Compute the Jacobian (e.g.

pdf

probability density function

plot

Plots the PDF of the distribution

ppf

inverse cumulative distribution function

sample

Override sample from base class due to bespoke implementation

setStartPoint

set_location

Updating the distribution location parameter.

set_scale

Updating the distribution scale parameter.

u_to_x

Transformation from u to x

x_to_u

Transformation from x to u

Attributes

std_normal

pdf(x)[source]#

probability density function

cdf(x)[source]#

cumulative distribution function

ppf(p)[source]#

inverse cumulative distribution function

sample(n=1000)[source]#

Override sample from base class due to bespoke implementation

u_to_x(u)[source]#

Transformation from u to x

x_to_u(x)[source]#

Transformation from x to u

jacobian(u, x)[source]#

Compute the Jacobian (e.g. Lemaire, eq. 4.9) For the Normal distribution, the more usual general function can be specialized as follows.

set_location(loc=0)[source]#

Updating the distribution location parameter. For Normal, there is no need to update other properties as a result of this change.

set_scale(scale=1)[source]#

Updating the distribution scale parameter. For Normal, there is no need to update other properties as a result of this change.

plot(ax=None, **kwargs)#

Plots the PDF of the distribution