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.


Number of objects


Identifier of the algorithm

n_queriesint, optional (default=20)

Number of validation queries.


Embedding dimension.

queriesList[Tuple[int, int, int]]

The list of queries to ask about. Each query is (head, obj1, obj2) where obj1 and obj2 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, then head_index=3, then head_index=6.