Skip to contents

Abstract base class for objects that sample points from a search space.

A SpaceSampler can sample directly from a paradox::ParamSet or thin down an existing candidate pool. Some samplers may additionally make use of a known_pool of already-known points. The intended contract is that pool and known_pool are disjoint, but this is not checked.

If pool is given and n >= nrow(pool), the full pool is returned directly.

Creates a new space sampler.

Sample n points from the search space or thin down a pool.

Arguments

id

(character(1))
Identifier of the sampler.

deterministic

(logical(1))
Whether this sampler is marked as deterministic.

packages

(character())
Optional package names required by the sampler.

param_set

(paradox::ParamSet)
Configuration parameter set.

label

(character(1))
Label for the object.

man

(character(1))
String in the format [pkg]::[topic] pointing to a manual page.

n

(integer(1))
Number of points to sample.

search_space

(paradox::ParamSet)
Search space describing the point columns.

pool

(NULL | data.table)
Optional candidate pool to sample from.

known_pool

(NULL | data.table)
Optional already-known points that may influence the sampler.

Value

data.table.

Fields

label

(character(1)) Label for this object.

man

(character(1)) String in the format [pkg]::[topic] pointing to a manual page.

packages

(character()) Required packages.

deterministic

(logical(1)) Whether the sampler is marked as deterministic.

Dictionary

This class can be retrieved from mlr_space_samplers via clx_sps() and clx_spss().