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
cumulative distribution function
getMean
getName
getStartPoint
getStdv
Compute the Jacobian (e.g.
probability density function
Plots the PDF of the distribution
inverse cumulative distribution function
Override sample from base class due to bespoke implementation
setStartPoint
Updating the distribution location parameter.
Updating the distribution scale parameter.
Transformation from u to x
Transformation from x to u
Attributes
std_normal
- 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