FindDensityMaxima_FixedSpread


Finds local density maxima in a set of values by looking for the highest number of samples withing a range determined by the given spread.

Applications:Can be used to determine histogram's local maxima without actually creating the histogram.

Syntax

C++
C#
Python
 
def FindDensityMaxima_FixedSpread(
	inValues: list[float],
	/,
	*,
	inSpread: float = 2.0,
	inMinCount: int = 1,
	inAllowOverlapping: bool = False,
	inCycle: float | None = None,
	inModeFunction: DataModeFunction = DataModeFunction.Mean,
	inLocalBlindness: LocalBlindness | None = None
)
-> (
	outModes: list[float],
	outCounts: list[int]
)

Parameters

Name Type Range Default Description
Input value inValues list[float] Data points array
Input value inSpread float 0.0 - 2.0 Maximum spread of a single window
Input value inMinCount int 1 - 1 Windows with a smaller count will not be considered
Input value inAllowOverlapping bool False If true all local maxima will be returned otherwise for each group of ranges that overlap only the one with the smallest real spread will be returned
Input value inCycle float | None None Length of the cycle if data is to be considered cyclically
Input value inModeFunction DataModeFunction DataModeFunction.Mean Method of calculating the center of a data mode
Input value inLocalBlindness LocalBlindness | None None Helps to sieve out unnecessary points
Output value outModes list[float] Computed data modes
Output value outCounts list[int] Sizes of windows that had a mode