pmrf.sampling.samplers.LatinHypercubeSampler

class pmrf.sampling.samplers.LatinHypercubeSampler(model)[source]

Bases: BaseSampler

Sampler using Latin Hypercube Sampling (LHS).

LHS is a stratified sampling method that generates sample points that are more evenly distributed across the hypercube than standard random sampling. This implementation uses scipy.stats.qmc.LatinHypercube.

Parameters:

model (ModelT)

__init__(model)

Initialize the sampler.

Parameters:

model (Model) – The model to sample from.

Methods

__class_getitem__(params)

__delattr__(name, /)

Implement delattr(self, name).

__dir__()

Default dir() implementation.

__eq__(value, /)

Return self==value.

__format__(format_spec, /)

Default object formatter.

__ge__(value, /)

Return self>=value.

__getattribute__(name, /)

Return getattr(self, name).

__gt__(value, /)

Return self>value.

__hash__()

Return hash(self).

__init__(model)

Initialize the sampler.

__init_subclass__(*args, **kwargs)

This method is called when a class is subclassed.

__iter__()

Iterate over generated models.

__le__(value, /)

Return self<=value.

__len__()

Return the number of samples in the current iteration context.

__lt__(value, /)

Return self<value.

__ne__(value, /)

Return self!=value.

__new__(**kwargs)

__reduce__()

Helper for pickle.

__reduce_ex__(protocol, /)

Helper for pickle.

__repr__()

Return repr(self).

__setattr__(name, value, /)

Implement setattr(self, name, value).

__sizeof__()

Size of object in memory, in bytes.

__str__()

Return str(self).

__subclasshook__

Abstract classes can override this to customize issubclass().

_generate_hypercube_samples(N, D)

Generate samples using Latin Hypercube Sampling.

_generate_params(N)

Internal method to generate parameter values in physical space.

generate_features(N, features, frequency[, ...])

Generate feature vectors for N random samples.

generate_models(N)

Generate N random model instances using the sampler's engine.

range(N)

Configure the sampler for iteration over N samples.

Attributes

__abstractmethods__

__annotations__

__dict__

__doc__

__module__

__orig_bases__

__parameters__

__slots__

__weakref__

list of weak references to the object (if defined)

_abc_impl

_is_protocol