chaospy.quadrature.leja

chaospy.quadrature.leja(order, dist, rule='fejer_2')[source]

Generate Leja quadrature node.

Args:
order (int):

The order of the quadrature.

dist (chaospy.distributions.baseclass.Distribution):

The distribution which density will be used as weight function.

rule (str):

In the case of lanczos or stieltjes, defines the proxy-integration scheme.

Returns:
(numpy.ndarray, numpy.ndarray):
abscissas:

The quadrature points for where to evaluate the model function with abscissas.shape == (len(dist), N) where N is the number of samples.

weights:

The quadrature weights with weights.shape == (N,).

Notes:

Implemented as proposed in Narayan and Jakeman [4].

Example:
>>> distribution = chaospy.Iid(chaospy.Normal(0, 1), 2)
>>> abscissas, weights = chaospy.quadrature.leja(2, distribution)
>>> abscissas.round(2)
array([[-1.41, -1.41, -1.41,  0.  ,  0.  ,  0.  ,  1.76,  1.76,  1.76],
       [-1.41,  0.  ,  1.76, -1.41,  0.  ,  1.76, -1.41,  0.  ,  1.76]])
>>> weights.round(3)
array([0.05 , 0.133, 0.04 , 0.133, 0.359, 0.107, 0.04 , 0.107, 0.032])