jasondavies / science.js

Scientific and statistical computing in JavaScript.
http://www.jasondavies.com/
Other
886 stars 93 forks source link

Fixes LOESS divide by zero on small bandwidth #21

Open feynmanliang opened 8 years ago

feynmanliang commented 8 years ago

When the bandwidth is too small, only a single point is in the bandwidth. This causes a divide by zero error. Instead, we should just use that single point as the LOESS fit.


This change is Reviewable

feynmanliang commented 8 years ago

@jasondavies Can you take a look?