pyuncertainnumber.calibration.pdfs¶
@author: Mukesh K. Ramancha
A collection of common probability distributions
Classes¶
Blueprint for other classes. |
|
Uniform continuous distribution |
|
Half Normal distribution with zero mean |
|
Normal distribution |
|
Truncated Normal distribution |
|
Multivariate Normal distribution |
Module Contents¶
- class pyuncertainnumber.calibration.pdfs.ProbabilityDensityFun¶
Bases:
abc.ABCBlueprint for other classes. Base class. Abstract class is not a concrete class, it cannot be instantiated
- abstractmethod generate_rns(N)¶
Method to generate ‘N’ random numbers
- Parameters:
N (int) – number of random numbers needed.
- Return type:
numpy array of size N
- abstractmethod log_pdf_eval(x)¶
Method to compute log of the pdf at x
- Parameters:
x (float) – value where to evalute the pdf.
- Return type:
float - log of pdf evaluated at x.
- class pyuncertainnumber.calibration.pdfs.Uniform(lower=0, upper=1)¶
Bases:
ProbabilityDensityFunUniform continuous distribution
- lower = 0¶
- upper = 1¶
- generate_rns(N)¶
Method to generate ‘N’ random numbers
- Parameters:
N (int) – number of random numbers needed.
- Return type:
numpy array of size N
- log_pdf_eval(x)¶
Method to compute log of the pdf at x
- Parameters:
x (float) – value where to evalute the pdf.
- Return type:
float - log of pdf evaluated at x.
- class pyuncertainnumber.calibration.pdfs.HalfNormal(sig=1)¶
Bases:
ProbabilityDensityFunHalf Normal distribution with zero mean
- sig = 1¶
- generate_rns(N)¶
Method to generate ‘N’ random numbers
- Parameters:
N (int) – number of random numbers needed.
- Return type:
numpy array of size N
- log_pdf_eval(x)¶
Method to compute log of the pdf at x
- Parameters:
x (float) – value where to evalute the pdf.
- Return type:
float - log of pdf evaluated at x.
- class pyuncertainnumber.calibration.pdfs.Normal(mu=0, sig=1)¶
Bases:
ProbabilityDensityFunNormal distribution
- mu = 0¶
- sig = 1¶
- generate_rns(N)¶
Method to generate ‘N’ random numbers
- Parameters:
N (int) – number of random numbers needed.
- Return type:
numpy array of size N
- log_pdf_eval(x)¶
Method to compute log of the pdf at x
- Parameters:
x (float) – value where to evalute the pdf.
- Return type:
float - log of pdf evaluated at x.
- class pyuncertainnumber.calibration.pdfs.TruncatedNormal(mu=0, sig=1, low=-np.Inf, up=np.Inf)¶
Bases:
ProbabilityDensityFunTruncated Normal distribution
- mu = 0¶
- sig = 1¶
- low¶
- up¶
- generate_rns(N)¶
Method to generate ‘N’ random numbers
- Parameters:
N (int) – number of random numbers needed.
- Return type:
numpy array of size N
- log_pdf_eval(x)¶
Method to compute log of the pdf at x
- Parameters:
x (float) – value where to evalute the pdf.
- Return type:
float - log of pdf evaluated at x.
- class pyuncertainnumber.calibration.pdfs.MultivariateNormal(mu=np.zeros(2), E=np.identity(2))¶
Bases:
ProbabilityDensityFunMultivariate Normal distribution
- mu¶
- E¶
- d¶
- logdetE¶
- Einv¶
- generate_rns(N)¶
Method to generate ‘N’ random numbers
- Parameters:
N (int) – number of random numbers needed.
- Return type:
numpy array of size N
- log_pdf_eval(x)¶
Method to compute log of the pdf at x
- Parameters:
x (float) – value where to evalute the pdf.
- Return type:
float - log of pdf evaluated at x.