FindDensityMaxima_FixedCount


Finds local density maxima in set of values by looking for the highest concentration of a fixed number of samples.

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

Syntax

C++
C#
Python
 
def FindDensityMaxima_FixedCount(
	inValues: list[float],
	/,
	*,
	inCount: int = 3,
	inMaxSpread: float | None = None,
	inAllowOverlapping: bool = False,
	inCycle: float | None = None,
	inModeFunction: DataModeFunction = DataModeFunction.Mean,
	inLocalBlindness: LocalBlindness | None = None
)
-> (
	outModes: list[float],
	outSpreads: list[float]
)

Parameters

Name Type Range Default Description
Input value inValues list[float] Data points array
Input value inCount int 2 - 3 Number of points in a single window
Input value inMaxSpread float | None None Maximum spread of points within a window
Input value inAllowOverlapping bool False If true all local maxima will be returned otherwise for each group of ranges that overlap a single mode will be returned (the middle of the group)
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 outSpreads list[float] Spreads of windows that had a mode