Regularize regression model

From Anonymous on 2016/03/04 15:56:24 +0000

I doubt many people will get the significance of this problem, but as someone who works with data a lot it really is pretty annoying.

Based on the graphs you display, it looks like you’re doing a polynomial regression, and then just looking for a local optimum. As the user gets lots of data, this will probably be fine (unless you increase the degree of the polynomial). But when there are just a few data points, it’s a pretty dramatic overfit. Currently I have around 10 nights logged. SAA is using what looks like a 4th-degree polynomial fit, and the fit just looks silly.

Copied from original feature request:

From Anonymous on 2016/03/05 06:19:53 +0000

Hi Petr,
It looks like you might be using, what, 4th-degree polynomials? Do you have any evidence the response is not just quadratic?

You predict deep sleep independently based on both bedtime and sleep duration. My first thought would be to predict jointly based on these two together. Just fit a quadratic response surface. I'd probably use some kind of robust modeling approach to minimize the effect of outliers. Maybe check out some of the built-in packages for this in R or so sklearn and go from there, so you can minimize the manual coding.

I hope this is helpful. I'm enjoying using your app - great work!