random_select

probly.evaluation.active_learning.strategies.random_select = <flextype.singledispatch.Flexdispatch object>

Select n unique random indices, returning the backend’s native index type.

Dispatches on the type of x_ref (a reference array from the pool, used only for backend detection).

Parameters:
  • x_ref – Reference array for backend dispatch (e.g. pool.x_unlabeled).

  • n_pool – Total number of items to choose from.

  • n – Number of indices to select.

  • rng – A numpy.random.Generator instance for reproducible sampling.

Returns:

Array of n unique integer indices in the backend’s native type.