fps_np

This function implements the Farthest Point Sampling (FPS) algorithm using the numpy library. FPS selects a subset of points from a dataset by iteratively choosing the point that is farthest from the current set of selected points.

Parameters:

Xnumpy.ndarray (n_samples, n_features)

Input points, representing a set of data points.

initializationlist

List of indices (rows of the input points matrix) representing the initial set of selected elements.

bint

The desired number of points to select.

distance_funccallable, optional (default=None)

A function to compute pairwise distances. If None, Euclidean distance is used.

precomputed_distancesbool, optional (default=False)

If True, the input X is assumed to be a precomputed distance matrix.

verbosebool, optional (default=False)

If True, progress messages are printed.

Returns:

centerslist

List of indices representing the selected points using the FPS algorithm.