IntegrationMeasure

class probnum.quad.IntegrationMeasure(domain, input_dim)

Bases: ABC

An abstract class for a measure against which a target function is integrated.

Child classes implement specific integration measures and, if available, make use of random variables for sampling and evaluation of the density function.

Parameters
  • domain (DomainLike) – Domain of integration. Contains lower and upper bound as a scalar or np.ndarray.

  • input_dim (Optional[IntLike]) – Dimension of the integration domain.

Return type

None

Methods Summary

__call__(points)

Evaluate the density function of the integration measure.

sample(n_sample[, rng])

Sample n_sample points from the integration measure.

Methods Documentation

__call__(points)[source]

Evaluate the density function of the integration measure.

Parameters

points (Union[FloatLike, np.ndarray]) – shape=(n_points, input_dim) – Input locations.

Returns

shape=(n_points,) – Density evaluated at given locations.

Return type

density_evals

sample(n_sample, rng=Generator(PCG64) at 0x7EFD276FFE40)[source]

Sample n_sample points from the integration measure.

Parameters
  • n_sample (IntLike) – Number of points to be sampled

  • rng (Optional[Generator]) – Random number generator. Optional. Default is np.random.default_rng().

Returns

shape=(n_sample,input_dim) – Sampled points

Return type

points