Download node_modules/d3-array/src/threshold/freedmanDiaconis.js from NKessler/Horizon: direct link, hf CLI and curl.
- Browser
- Download file 303 Bytes
-
https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/threshold/freedmanDiaconis.js
- Command line
-
hf download hf://NKessler/Horizon/node_modules/d3-array/src/threshold/freedmanDiaconis.js
-
curl -L -o freedmanDiaconis.js https://huggingface.co/NKessler/Horizon/resolve/main/node_modules/d3-array/src/threshold/freedmanDiaconis.js
303 Bytes
| import count from "../count.js"; | |
| import quantile from "../quantile.js"; | |
| export default function thresholdFreedmanDiaconis(values, min, max) { | |
| const c = count(values), d = quantile(values, 0.75) - quantile(values, 0.25); | |
| return c && d ? Math.ceil((max - min) / (2 * d * Math.pow(c, -1 / 3))) : 1; | |
| } | |