public class ProportionalOracle extends Object
This class is a proportional oracle, which will predict values from a fixed, nominal set, where each nominal value has a specific weight. The values are drawn from a unified random distribution, weighted by a predefined weighting scheme.
Thus, it allows for pre-defining the proportion of each of the nominal values in the final outcome.
| Modifier and Type | Field and Description |
|---|---|
(package private) static org.slf4j.Logger |
log |
(package private) TreeMap<Double,String> |
map |
(package private) Random |
rnd |
(package private) Map<String,Double> |
weights |
| Constructor and Description |
|---|
ProportionalOracle() |
ProportionalOracle(Long seed) |
| Modifier and Type | Method and Description |
|---|---|
Set<String> |
getLabels() |
String |
getNext() |
Double |
getWeight(String key) |
static void |
main(String[] args) |
void |
setSeed(Long seed) |
void |
setWeights(Map<String,Double> weights) |
String |
toString() |
static org.slf4j.Logger log
Random rnd
public ProportionalOracle()
public ProportionalOracle(Long seed)
Copyright © 2018. All rights reserved.