esda.prominence

esda.prominence(X, connectivity, return_all=False, gdf=None, verbose=False, middle='mean', progressbar=False)[source]

Return the prominence of peaks in input, given a connectivity matrix.

Parameters:
Xnumpy.ndarray

an array of shape N,p containing data to use for computing prominence. When p > 1, X will be converted to an “elevation” using to_elevation.

connectivityscipy.sparse matrix

a sparse matrix encoding the connectivity graph pertaining to rows of X. If coordinates are provided, they must be (N,2), and the delaunay triangulation will be computed.

return_classbool (default: False)

whether or not to return additional information about the result, such as the set of dominating peaks or the set of classifications for each observation.

verbosebool (default: None)

whether or not to print extra information about the progress of the algorithm.

middlestr or callable() (default: “mean”)

how to compute the center of mass from X, when the dimension of X > 2.

Returns:
the prominence of each observation in X, possibly along with the
set of saddle points, peaks, and/or dominating peak tree.

Notes

An observation has 0 prominence when it is a saddle point. An observation has positive prominence when it is a peak, and this is computed as the elevation of the peak minus the elevation of the saddle point.

Observations have “NA” prominence when they are neither a saddle point nor a peak.