Sampling¤
popinn.UniformCollocationSampler
¤
Resample one residual term's collocation points, typically the interior coordinates where the PDE is enforced.
Source code in src/popinn/sampling.py
__init__(data, bounds, num_samples=None, field='pde_coords')
¤
Configure the sampler.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
data
|
equinox.Module
|
The training data container to resample from. |
required |
bounds
|
collections.abc.Sequence[tuple[float, float]]
|
One (min, max) pair per
coordinate axis of |
required |
num_samples
|
int | collections.abc.Sequence[int] | None
|
Number of collocation
points to sample per axis. An int applies to every axis; a sequence
gives a per-axis count. None (default) reuses the current
per-axis sizes of |
None
|
field
|
str
|
Name of the coordinate field to resample. Defaults to 'pde_coords', i.e. the interior collocation points. |
'pde_coords'
|
Raises:
| Type | Description |
|---|---|
ValueError
|
If |
Source code in src/popinn/sampling.py
__call__(key)
¤
Draw a new batch with field resampled uniformly.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
key
|
typing.Union
|
PRNG key. |
required |
Returns:
| Type | Description |
|---|---|
equinox.Module
|
A new batch with |