public class AdaptiveImportanceSampler extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AdaptiveImportanceSampler.Configuration
A configuration that contains all the relevant information needed to generate
a number of samples from a group of tree automata.
|
Constructor and Description |
---|
AdaptiveImportanceSampler()
Create a new instance that will use the current time to initialize the
random number generation.
|
AdaptiveImportanceSampler(long seed)
Create a new instance that will use the given seed to initialize the
random number generation.
|
Modifier and Type | Method and Description |
---|---|
List<TreeSample<Rule>> |
adaSample(int rounds,
int populationSize,
RuleWeighting rw,
boolean deterministic,
boolean reset)
Runs the sampler for the given number of rounds with the given population
size and adapting the given rule weights.
|
TreeSample<Rule> |
adaSampleMinimal(int rounds,
int populationSize,
RuleWeighting rw,
boolean deterministic,
boolean reset)
Runs the sampler for the given number of rounds with the given population
size and adapting the given rule weights.
|
public AdaptiveImportanceSampler(long seed)
seed
- public AdaptiveImportanceSampler()
public List<TreeSample<Rule>> adaSample(int rounds, int populationSize, RuleWeighting rw, boolean deterministic, boolean reset)
rounds
- how many rounds of adaption we runpopulationSize
- the population size used during sampling.rw
- the rule weighting that gives the proposal automaton and the target weightsdeterministic
- whether the underlying tree automaton can be assumed to be deterministicreset
- whether we reset the rule weighting before we start samplingpublic TreeSample<Rule> adaSampleMinimal(int rounds, int populationSize, RuleWeighting rw, boolean deterministic, boolean reset)
rounds
- how many rounds of adaption we runpopulationSize
- the population size used during sampling.rw
- the rule weighting that gives the proposal automaton and the target weightsdeterministic
- whether the underlying tree automaton can be assumed to be deterministicreset
- whether we reset the rule weighting before we start samplingCopyright © 2017. All rights reserved.