actsnclass.random_sampling

actsnclass.random_sampling(test_ids: numpy.array, queryable_ids: numpy.array, batch=1, seed=42, screen=False) → list

Randomly choose an object from the test sample.

Parameters:
  • test_ids (np.array) – Set of ids for objects in the test sample.
  • queryable_ids (np.array) – Set of ids for objects available for querying.
  • batch (int (optional)) – Number of objects to be chosen in each batch query. Default is 1.
  • screen (bool (optional)) – If True display on screen the ids of queried objects. Default is False.
  • seed (int (optional)) – Seed for random number generator. Default is 42.
Returns:

query_indx – List of indexes identifying the objects from the test sample to be queried.

Return type:

list