salmon.triplets.samplers
.ARR
- class salmon.triplets.samplers.ARR(R: int = 1, n_top: int = 1, module: str = 'TSTE', priority: str = 'random', **kwargs)
An adaptive “round robin” sampler.
Note
This class is usable in it’s default configuration. Most of the active sampling benchmarks have been run under the default configuration of this class. Please carefully consider any changes to the default parameters.
Notes
This algorithms asks about “high scoring queries” uniformly at random. For each head, the top
n_top
queries are selected. The query shown to the user is a query selected uniformly at random from this set.If
n_top > 1
, then in practice, this sampling algorithm randomly asks about high scoring queries for each head. Becaues it’s asynchronous, it randomly selects a head (instead of doing it a round-robin fashion).References
- 1
Heim, Eric, et al. “Active perceptual similarity modeling with auxiliary information.” arXiv preprint arXiv:1511.02254 (2015).
- __init__(R: int = 1, n_top: int = 1, module: str = 'TSTE', priority: str = 'random', **kwargs)
- Parameters
- Rint (optional, default
1
) Adaptive sampling starts after
R * n
responses have been received.- modulestr, optional (default
"TSTE"
). The noise model to use.
- n_topint (optional, default
1
) For each head, the number of top-scoring queries to ask about.
- prioritystr, optional (default
"random"
) Determines how queries should be ordered. Setting
priority="random"
will randomly shuffle queries; settingpriority="original"
will perserve the original scores. Settingpriority="approx"
will add some noise to the original score ranks.Regardless of the
scores
value,n_top
queries per head will be perserved. It is likely most relevant whenn_top==1
.- kwargsdict
Keyword arguments to pass to
Adaptive
.
- Rint (optional, default