Back to Aurora Vision Library website

You are here: Start » Function Reference » Data Classification » Statistics » FindDensityMaxima_FixedSpread

FindDensityMaxima_FixedSpread


Header: AVL.h
Namespace: avl
Module: FoundationPro

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#
 
void avl::FindDensityMaxima_FixedSpread
(
	const atl::Array<float>& inValues,
	float inSpread,
	int inMinCount,
	bool inAllowOverlapping,
	atl::Optional<float> inCycle,
	avl::DataModeFunction::Type inModeFunction,
	atl::Optional<const avl::LocalBlindness&> inLocalBlindness,
	atl::Array<float>& outModes,
	atl::Array<int>& outCounts
)

Parameters

Name Type Range Default Description
Input value inValues const Array<float>& Data points array
Input value inSpread float 0.0 - 2.0f 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 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 Optional<float> NIL Length of the cycle if data is to be considered cyclically
Input value inModeFunction DataModeFunction::Type Mean Method of calculating the center of a data mode
Input value inLocalBlindness Optional<const LocalBlindness&> NIL Helps to sieve out unnecessary points
Output value outModes Array<float>& Computed data modes
Output value outCounts Array<int>& Sizes of windows that had a mode

Description

Find approximations of local density maxima in a data sample by looking for highest concentrations in a window with a bounded spread.

Overlapping windows (i.e. a series of windows with the same count) can be sieved if inAllowOverlapping is set to false. The sieving removes all modes that are shadowed by (i.e. are overlapping with) another mode with a smaller spread.

inMinCount and inLocalBlindness can be used to further filter out potentially unnecessary points in the output.

Errors

List of possible exceptions:

Error type Description
DomainError Empty array in FindDensityMaxima_FixedSpread.

See Also

  • FindDataMode_FixedSpread – Finds the mode in a set of data values by looking for highest number of samples withing the specified spread.
  • FindDensityMaxima_FixedCount – Finds local density maxima in set of values by looking for the highest concentration of a fixed number of samples.