HarryStevens / d3-regression

Calculate statistical regressions from two-dimensional data.
https://observablehq.com/collection/@harrystevens/d3-regression
BSD 3-Clause "New" or "Revised" License
167 stars 16 forks source link

Don't let median modify the input array #25

Open xangregg opened 4 years ago

xangregg commented 4 years ago

As far as I can tell, loess regression is the only client, and it expects the input array not to be modified when it calls median. Without this change, the non-optional robustness passes are just adding noise, I think. I checked the science.js and vega versions and they are already using non-destructive median functions.