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

FindDensityMaxima_FixedCount
Header: | FIL.h |
---|---|
Namespace: | fil |
Module: | FoundationPro |
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
void fil::FindDensityMaxima_FixedCount ( const ftl::Array<float>& inValues, int inCount, ftl::Optional<float> inMaxSpread, bool inAllowOverlapping, ftl::Optional<float> inCycle, fil::DataModeFunction::Type inModeFunction, ftl::Optional<const fil::LocalBlindness&> inLocalBlindness, ftl::Array<float>& outModes, ftl::Array<float>& outSpreads )
Parameters
Name | Type | Range | Default | Description | |
---|---|---|---|---|---|
![]() |
inValues | const Array<float>& | Data points array | ||
![]() |
inCount | int | 2 - ![]() |
3 | Number of points in a single window |
![]() |
inMaxSpread | Optional<float> | NIL | Maximum spread of points within a window | |
![]() |
inAllowOverlapping | bool | 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) | ||
![]() |
inCycle | Optional<float> | NIL | Length of the cycle if data is to be considered cyclically | |
![]() |
inModeFunction | DataModeFunction::Type | Mean | Method of calculating the center of a data mode | |
![]() |
inLocalBlindness | Optional<const LocalBlindness&> | NIL | Helps to sieve out unnecessary points | |
![]() |
outModes | Array<float>& | Computed data modes | ||
![]() |
outSpreads | Array<float>& | Spreads 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 fixed number of samples.
Overlapping windows (i.e. a series of windows with the same count and the same spread) can be returned as a single mode (the middle those windows) if inAllowOverlapping is set to false.
inMaxSpread 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_FixedCount. |
DomainError | Unsupported mode function in FindDensityMaxima_FixedCount. |
See Also
- FindDataMode_FixedCount – Finds the mode in a set of data values by looking for highest concentration of a fixed number of samples.
- 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.