generate_num_candidates_and_ranks

generate_num_candidates_and_ranks(num_ranks, max_num_candidates, seed=None)[source]

Generate random number of candidates, and coherent ranks.

Parameters:
  • num_ranks (int) – the number of ranks to generate

  • max_num_candidates (int) – the maximum number of candidates (e.g., the number of entities)

  • seed (Optional[int]) – the random seed.

Return type:

Tuple[ndarray, ndarray]

Returns:

shape: (num_ranks,) a pair of integer arrays, ranks and num_candidates for each individual ranking task