pystra.distributions.distribution.Distribution#

class Distribution(name='', dist_obj=None, mean=None, stdv=None, startpoint=None)[source]#

Bases: object

Probability distribution

name#

Name of the random variable

Type:

str

dist_obj#

if subclassing SciPy distribution

Type:

SciPy rv

mean#

Mean or other variable

Type:

float

stdv#

Standard deviation or other variable

Type:

float

startpoint#

Start point for seach

Type:

float

p1#

Parameter for the distribution

Type:

float

p2#

Parameter for the distribution

Type:

float

p3#

Parameter for the distribution

Type:

float

p4#

Parameter for the distribution

Type:

float

input_type#

Change meaning of mean and stdv

Type:

any

Default#

all values

Methods

cdf

Cumulative distribution function

getMean

getName

getStartPoint

getStdv

jacobian

Compute the Jacobian

pdf

Probability density function

plot

Plots the PDF of the distribution

ppf

Inverse cumulative distribution function

sample

Return a sample of the distribution of length n

setStartPoint

set_location

set_scale

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(u)[source]#

Inverse cumulative distribution function

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

sample(n=1000)[source]#

Return a sample of the distribution of length n

plot(ax=None, **kwargs)[source]#

Plots the PDF of the distribution