sampling (pmrf.sampling)

The sampling module, for random and adaptive sampling of ParamRF models.

All samplers in this module inherit from pmrf.sampling.BaseSampler. Sampling is done by initializing a Sampler class with the model and sampling targets, and then calling pmrf.sampling.BaseSampler.run(). Sampling targets include the model features (e.g. S11), the sampling frequency, and additional targets provided by specific sub-class algorithms (such as surrogate models etc.).

When calling run, all key-word arguments are forwarded to the underlying backend/algorithm (for example, the EqxLearnUncertaintySampler). This allows full configuration of the sampling algorithm, while also providing a convenience wrapper for simple use.

Results are returned in the form of pmrf.sampling.SampleResults. This contains the details about the initial configuration, as well as the sampled parameters and features.

Classes

BaseSampler(model, **kwargs)

Base class for model sampling and active learning loops.

SampleResults([initial_model, frequency, ...])

Container for the results of a model sampling process.

OneshotSampler(model, **kwargs)

Base class for static, non-adaptive sampling strategies.

AcquisitionSampler(model, **kwargs)

Base class for adaptive, acquisition-based sampling (Active Learning).

UniformSampler(model, **kwargs)

LatinHypercubeSampler(model, **kwargs)

Sampler using Latin Hypercube Sampling (LHS).

FieldSampler(model, **kwargs)

Base class for sampling new points at the maxima of a learned scalar field.

EqxLearnUncertaintySampler(model, surrogate)

Adaptive sampler that targets regions of high surrogate model uncertainty.