sgpykit.tools.rescaling_functions
Functions
|
Build a mapping function to shift sparse grids from a reference domain to a target domain. |
- sgpykit.tools.rescaling_functions.get_interval_map(a, b, type_)[source]
Build a mapping function to shift sparse grids from a reference domain to a target domain.
This function constructs and returns a callable that maps points from a reference domain (either the hypercube (-1,1)^N or standard Gaussian space) to a user-specified box or Gaussian product distribution.
- Parameters:
- anumpy.ndarray
Lower bounds of the target domain (one per dimension).
- bnumpy.ndarray
Upper bounds of the target domain (one per dimension).
- type_str
Type of mapping to construct. Supported values are: - ‘uniform’: maps points from (-1,1)^N to the box (a(1),b(1)) x … x (a(N),b(N)) - ‘gaussian’: maps points from standard Gaussian space to a product of Gaussians with
means in a and standard deviations in b
- Returns:
- callable
A function that takes a matrix of points (one per column) in the reference domain and returns a matrix of points in the target domain. If type_ is not supported, returns None.
Notes
The output function must be used as X = interval_map(T), where T is a matrix of points in the reference domain (one point per column), and X is a matrix of points in the target domain (one point per column).