MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / bigInterquartileRange

Function bigInterquartileRange

src/compute-engine/numerics/statistics.ts:436–441  ·  view source on GitHub ↗
(
  values: Iterable<BigDecimal>
)

Source from the content-addressed store, hash-verified

434 * agree on which value wins a tie.
435 *
436 * Two data count together only when their doubles are equal. That is the
437 * precision of the sample: two machine values that differ in the last bit
438 * are two values. (`0` and `-0` count together, and so do two `NaN`.)
439 */
440export function mode(values: Iterable<number>): number {
441 const counts = new Map<number, number>();
442 for (const v of values) counts.set(v, (counts.get(v) ?? 0) + 1);
443 let max = 0;
444 let mode = NaN;

Callers 1

statistics.tsFile · 0.90

Calls 2

bigQuartilesFunction · 0.85
subMethod · 0.65

Tested by

no test coverage detected