Hacker News new | ask | show | jobs
by stadeschuldt 1180 days ago
Very nice. I’ve used Loess regression ten years ago when charting my body weight with R. Here is the blog post about it:

https://blog.tafkas.net/2013/06/22/five-years-of-weight-trac...

1 comments

Geom_smooth actually interpolates 80 points along the range of your data and then fits a Loess regression on that. It is incredibly slow to train on significant numbers of data points, hence the workaround.

Edit: I misremembered, it evaluates 80 predictions to draw the line, which is why you can't retrieve the formula from the plot object anymore, but it does in fact fit on the whole dataset.

Loess regression does have n^2 memory complexity, but the cutoff it uses to decide to go for a different model family is n >= 1000.