MCPcopy Create free account
hub / github.com/microsoft/SandDance / quartiles

Function quartiles

docs/app/js/sanddance-app.js:119114–119120  ·  view source on GitHub ↗
(array, f)

Source from the content-addressed store, hash-verified

119112 return p.map((_)=>(0, _d3Array.quantileSorted)(values, _));
119113}
119114function quartiles(array, f) {
119115 return quantiles(array, [
119116 0.25,
119117 0.50,
119118 0.75
119119 ], f);
119120}
119121// Theory, Practice, and Visualization. Wiley.
119122function estimateBandwidth(array, f) {
119123 const n = array.length, d = (0, _d3Array.deviation)(array, f), q = quartiles(array, f), h = (q[2] - q[0]) / 1.34, v = Math.min(d, h) || d || Math.abs(q[0]) || 1;

Callers 1

estimateBandwidthFunction · 0.70

Calls 1

quantilesFunction · 0.70

Tested by

no test coverage detected