pyhctsa.operations.distribution.histogram_mode¶
-
pyhctsa.operations.distribution.histogram_mode(y, num_bins=
10, do_simple=True)¶ Measures the mode of the data vector using histograms with a given number of bins.
The mode is the center of the fullest bin of an equal-width histogram (the mean of the centers if several bins are equally full). The bin edges are given explicitly (
pyhctsa.robust.bf_hist_edges()), so that the result does not depend on how a histogram routine rounds its bin limits and width.- Parameters:¶
- y : array-like¶
The input time series.
- num_bins : int or str, optional¶
The number of bins to use in the histogram, or the name of a rule for the number of bins (
'auto','fd','sqrt'or'sturges'; seepyhctsa.robust.bf_hist_edges()). Default is 10.- do_simple : bool, optional¶
Deprecated and ignored: the bins are always equal-width between the minimum and maximum with explicit edges.
Falseraises aDeprecationWarning.
- Returns:¶
The mode of the data vector using histograms with num_bins bins.
- Return type:¶
float