chaospy.quadrature.hermite

chaospy.quadrature.hermite(order, mu=0.0, sigma=1.0, physicist=False)[source]

Gauss-Hermite quadrature rule.

Compute the sample points and weights for Gauss-Hermite quadrature. The sample points are the roots of the nth degree Hermite polynomial. These sample points and weights correctly integrate polynomials of degree \(2N-1\) or less.

Gaussian quadrature come in two variants: physicist and probabilist. For Gauss-Hermite physicist means a weight function \(e^{-x^2}\) and weights that sum to :math`sqrt(pi)`, and probabilist means a weight function is \(e^{-x^2/2}\) and sum to 1.

Args:
order (int):

The quadrature order.

mu (float):

Non-centrality parameter.

sigma (float):

Scale parameter.

physicist (bool):

Use physicist weights instead of probabilist variant.

Returns:
abscissas (numpy.ndarray):

The order+1 quadrature points for where to evaluate the model function with.

weights (numpy.ndarray):

The quadrature weights associated with each abscissas.

Examples:
>>> abscissas, weights = chaospy.quadrature.hermite(3)
>>> abscissas
array([[-2.33441422, -0.74196378,  0.74196378,  2.33441422]])
>>> weights
array([0.04587585, 0.45412415, 0.45412415, 0.04587585])
See also:

chaospy.quadrature.gaussian()