dora.active_sampling.active_sampling.Sampler

class dora.active_sampling.active_sampling.Sampler(lower, upper)

Sampler Class

Provides a basic template and interface to specific Sampler subclasses

lower

numpy.ndarray -- Lower bounds for each parameter in the parameter space

upper

numpy.ndarray -- Upper bounds for each parameter in the parameter space

dims

int -- Dimension of the parameter space (number of parameters)

X

ArrayBuffer -- Contiguous Buffer of feature vectors representing observed locations in the parameter space

y

ArrayBuffer -- Contiguous Buffer of target outputs or expected (virtual) target outputs corresponding to the feature vectors 'X'

virtual_flag
ArrayBuffer -- A contiguous array of boolean flags indicating virtual elements of 'y'
True: Corresponding target output is virtual False: Corresponding target output is observed
pending_results

dict -- A dictionary that maps the job ID to the corresponding index in both the 'X' and 'y' buffers.

__init__(lower, upper)

Initialises the Sampler class

Note

Currently only supports rectangular type restrictions on the

parameter space

Parameters:
  • lower (array_like) -- Lower or minimum bounds for the parameter space
  • upper (array_like) -- Upper or maximum bounds for the parameter space

Methods

__init__(lower, upper) Initialises the Sampler class
pick() Picks the next location in parameter space for the next observation
update(uid, y_true) Updates a job with its observed value

Previous topic

dora.active_sampling.util.ArrayBuffer