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

Function estimateBandwidth

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

Source from the content-addressed store, hash-verified

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;
119124 return 1.06 * v * Math.pow(n, -0.2);
119125}
119126function bin(_) {
119127 // determine range
119128 const maxb = _.maxbins || 20, base = _.base || 10, logb = Math.log(base), div = _.divide || [

Callers 1

bandwidthFunction · 0.70

Calls 2

quartilesFunction · 0.70
minMethod · 0.45

Tested by

no test coverage detected