Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Loess Regression (wikipedia.org)
27 points by dedalus on March 24, 2023 | hide | past | favorite | 5 comments


There’s a nice visual interactive showcasing LOESS Regression toward the bottom of this article about the bias variance trade off: https://mlu-explain.github.io/bias-variance/


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...


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.


Loess curves are very useful in data visualization and in my opinion, underused and underappreciated.


What's a good deep dive into linear regression and all its siblings?




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: