salmon.triplets.samplers
.Validation
- class salmon.triplets.samplers.Validation(n, d=2, n_queries=20, queries=None, ident='')
Ask about the same queries repeatedly
- __init__(n, d=2, n_queries=20, queries=None, ident='')
This sampler asks the same questions repeatedly, useful to evaluate query difficulty.
- Parameters
- nint
Number of objects
- identstr
Identifier of the algorithm
- n_queriesint, optional (default=20)
Number of validation queries.
- dint
Embedding dimension.
- queriesList[Tuple[int, int, int]]
The list of queries to ask about. Each query is
(head, obj1, obj2)
whereobj1
andobj2
are randomly shown on the left and right. Each item in the tuple is the index of the target to ask about. For example:queries=[(0, 1, 2), (3, 4, 5), (6, 7, 8)]
will first ask about a query with
head_index=0
, thenhead_index=3
, thenhead_index=6
.