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