pyhctsa.robust.bf_quantile_edges

pyhctsa.robust.bf_quantile_edges(y, num_bins)

Histogram bin edges at the quantiles of the data: equiprobable bins (hctsa BF_QuantileEdges).

The Hazen quantiles of y (Hyndman & Fan definition 5) at 0, 1/num_bins, ..., 1, with repeated quantiles merged (fewer bins for tied values). All but the last edge are lowered, and the last widened, by 1e-9 of the range of the data, so that a value on an edge falls just above it, in the upper bin.

Parameters:
y : array-like

The data (NaNs are ignored).

num_bins : int

The number of bins.

Returns:

Increasing edges (a single value +/- 0.5 for constant data).

Return type:

numpy.ndarray