Definition of a univariate parameter.
This class defines a univariate parameter.
lower (float, optional) – Lower bound for the parameter.
upper (float, optional) – Upper bound for the parameter.
order (int, optional) – Order of the parameter.
param_type (str, optional) – The type of distribution that characterizes the parameter (see [1, 2]). Options include chebyshev (arcsine), gaussian,
uniform, triangular, gamma,
gumbel, chi and chi-squared.
If no string is provided, a uniform distribution is assumed. Data-driven and custom analytical parameters can also be constructed by setting this option to data and analytical and providing a weight_function (see examples).
shape_parameter_A (float, optional) – Most of the aforementioned distributions are characterized by two shape parameters. For instance, in the case of a gaussian (or truncated-gaussian), this represents the mean. In the case of a beta distribution this represents the alpha value. For a uniform distribution this input is not required.
shape_parameter_B (float, optional) – This is the second shape parameter that characterizes the distribution selected. In the case of a gaussian or truncated-gaussian, this is the variance.
data (numpy.ndarray, optional) – A data-set with shape (number_of_data_points, 2), where the first column comprises of parameter values, while the second column corresponds to the data observations. This input should only be used with the Analytical distribution.
endpoints (str, optional) – If set to both, then the quadrature points and weights will have end-points, based on Gauss-Lobatto quadrature rules. If set to upper or lower a Gauss-Radau rule is used to compute one end-point at either the upper or lower bound.
weight_function (Weight, optional) – An instance of Weight, which contains a bespoke analytical or data-driven weight (probability density) function.
>>> param = eq.Parameter(distribution='uniform', lower=-2, upper=2., order=3)
>>> param = eq.Parameter(distribution='beta', lower=-2., upper=15., order=4,
>>> shape_parameter_A=3.2, shape_parameter_B=1.7)
>>> pdf = eq.Weight( stats.gaussian_kde(data, bw_method='silverman'),
>>> support=[-3, 3.2])
>>> param = eq.Parameter(distribution='analytical',
>>> weight_function=pdf, order=2)
Xiu, D., Karniadakis, G. E., (2002) The Wiener-Askey Polynomial Chaos for Stochastic Differential Equations. SIAM Journal on Scientific Computing, 24(2), Paper
Gautschi, W., (1985) Orthogonal Polynomials-Constructive Theory and Applications. Journal of Computational and Applied Mathematics 12 (1985), pp. 61-76. Paper
Computes the cumulative density function associated with the Parameter.
points (numpy.ndarray, optional) – Values of the parameter at which the CDF must be evaluated.
numpy.ndarray – If points!=None. ndarray containing the cumulative density function evaluated at the points in points.
tuple – If points=None. A tuple (x, cdf), where cdf is the cumulative density function evaluated at the points in x.
Provides a description of the Parameter.
A description of the parameter.
Computes the inverse cumulative density function associated with the Parameter.
cdf_values (numpy.ndarray) – Values of the cumulative density function for which its inverse needs to be computed.
The inverse cumulative density function.
Computes the eigenvectors of the Jacobi matrix.
order (int) – Order of the recurrence coefficients.
Array of eigenvectors.
Computes the Jacobi matrix—a tridiagonal matrix of the recurrence coefficients.
2D array containing the Jacobi matrix.
Computes the probability density function associated with the Parameter.
points (numpy.ndarray, optional) – Values of the parameter at which the PDF must be evaluated.
numpy.ndarray – If points!=None. ndarray containing the probability density function evaluated at the points in points.
tuple – If points=None. A tuple (x, pdf), where pdf is the probability density function evaluated at the points in x.
Generates the recurrence coefficients.
order (int, optional) – Order of the recurrence coefficients.
Array of recurrence coefficients.
Generates samples from the distribution associated with the Parameter.
number_of_samples_required (int) – Number of samples that are required.
The generated samples.
Plots the cumulative density function for a Parameter. See plot_cdf() for full description.
Plots the first few orthogonal polynomials. See plot_orthogonal_polynomials() for full description.
Plots the probability density function for a Parameter. See plot_pdf() for full description.