incerto.active.greedy_k_center

incerto.active.greedy_k_center#

incerto.active.greedy_k_center(features, k, initial_centers=None)[source]#

Greedy k-center algorithm for diverse sample selection.

Iteratively selects points that are farthest from all previously selected points.

Parameters:
  • features (Tensor) – Feature representations (N, D)

  • k (int) – Number of centers to select (clamped to N if larger)

  • initial_centers (Optional[Tensor]) – Optional initial centers

Return type:

Tensor

Returns:

Indices of selected centers