Less Wrong is a community blog devoted to refining the art of human rationality. Please visit our About page for more information.

IlyaShpitser comments on Why the tails come apart - Less Wrong

115 Post author: Thrasymachus 01 August 2014 10:41PM

You are viewing a comment permalink. View the original post to see all comments and the full post content.

Comments (90)

You are viewing a single comment's thread. Show more comments above.

Comment author: IlyaShpitser 28 July 2014 07:53:10PM *  4 points [-]

I don't follow you. Overfitting happens when your model has too many parameters, relative to the amount of data you have. It is true that linear models may have few parameters compared to some non-linear models (for example linear regression models vs regression models with extra interaction parameters). But surely, we can have sparsely parameterized non-linear models as well.


All I am saying is that if things are surprising it is either due to "noise" (variance) or "getting the truth wrong" (bias). Or both.


I agree that "models we can quickly and easily use while under publish-or-perish pressure" is an important class of models in practice :). Moreover, linear models are often in this class, while a ton of very interesting non-linear models in stats are not, and thus are rarely used. It is a pity.

Comment author: henry4k2PH4 04 August 2014 12:40:26AM 2 points [-]

A technical difficulty with saying that overfitting happens when there are "too many parameters" is that the parameters may do arbitrarily complicated things. For example they may encode C functions, in which case a model with a single (infinite-precision) real parameter can fit anything very well! Functions that are linear in their parameters and inputs do not suffer from this problem; the number of parameters summarizes their overfitting capacity well. The same is not true of some nonlinear functions.

To avoid confusion it may be helpful to define overfitting more precisely. The gist of any reasonable definition of overfitting is: If I randomly perturb the desired outputs of my function, how well can I find new parameters to fit the new outputs? I can't do a good job of giving more detail than that in a short comment, but if you feel confused about overfitting, here's a good (and famous) article about frequentist learning theory by Vladimir Vapnik that may be useful:

http://web.mit.edu/6.962/www/www_spring_2001/emin/slt.pdf

Comment author: IlyaShpitser 04 August 2014 04:48:38PM *  2 points [-]

This is about "reasonable encoding" not "linearity," though. That is, linear functions of parameters encode reasonably, but not all reasonable encodings are linear. We can define a parameter to be precisely one bit of information, and then ask for the minimum of bits needed.

I don't understand why people are so hung up on linearity.

Comment author: [deleted] 01 August 2014 11:39:14AM 2 points [-]

I don't follow you. Overfitting happens when your model has too many parameters, relative to the amount of data you have. It is true that linear models may have few parameters compared to some non-linear models (for example linear regression models vs regression models with extra interaction parameters). But surely, we can have sparsely parameterized non-linear models as well.

Sure, technically if Alice fits a small noisy data set as y(x) = a*x+b and Bob fits it as y(x) = c*Ai(d*x) (where Ai is the Airy function) they've used the same number of parameters, but that won't stop me from rolling my eyes at the latter unless he has a good first-principle reason to privilege the hypothesis.

Comment author: Stuart_Armstrong 29 July 2014 09:44:42AM 2 points [-]

The problem is more practical than theoretical (don't have the links to hand. but you can find some in my silos of expertise post). Statisticians do not adjust properly for extra degrees of freedom, so among some category of published models, the linear ones will be best. Also, it seems that linear models are very good for modelling human expertise - we might think we're complex, but we behave pretty linearly.

Comment author: IlyaShpitser 29 July 2014 06:48:11PM *  2 points [-]

"Statisticians" is a pretty large set.


I still don't understand your original "because." I am talking about modeling the truth, not modeling what humans do. If the truth is not linear and humans use a linear modeling algorithm, well then they aren't a very good role model are they?


[ edit: did not downvote. ]

Comment author: Stuart_Armstrong 30 July 2014 09:42:22AM 1 point [-]

Because human flaws creep in in the process of modelling as well. Taking non linear relationships into account (unless there is a causal reason to do so) is asking for statistical trouble unless you very carefully account for how many models you have tested and tried (which almost nobody does).

Comment author: Lumifer 30 July 2014 02:41:34PM 4 points [-]

Taking non linear relationships into account (unless there is a causal reason to do so) is asking for statistical trouble unless you very carefully account for how many models you have tested and tried (which almost nobody does).

First, the structure of your model should be driven by the structure you're observing in your data. If you are observing nonlinearities, you'd better model nonlinearities.

Second, I don't buy that going beyond linear models is asking for statistical trouble. It just ain't so. People who overfit can (and actually do, all the time) stuff a ton of variables into a linear model and successfully overfit this way.

Comment author: Stuart_Armstrong 30 July 2014 04:09:43PM 2 points [-]

And the number of terms explode when you add non linearities.

5 independent variables with quadratic terms give you 21 values to play with (1 constant + 5 linear + 15 quadratic); it's much easier to justify conceptually "lets look at quadratic terms" than "lets add in 15 extra variables" even though the effect on degrees of freedom is the same.

Comment author: Lumifer 30 July 2014 04:46:43PM 2 points [-]

And the number of terms explode when you add non linearities

No, they don't. You control the number of degrees of freedom in your models. If you don't, linear models won't help you much, and if you do linearity does not matter.

5 independent variables with quadratic terms give you 21 values to play with

I think you're confusing quadratic terms and interaction terms. It also seems that you're thinking of linear models solely as linear regressions. Do you consider, e.g. GLMs to be "linear" models? What about transformations of input variables, are they disallowed in your understanding of linear models?

Comment author: Stuart_Armstrong 31 July 2014 08:39:31AM 2 points [-]

I'm talking about practice, not theory. And most of the practical results that I've seen is that regression linear models are full of overfitting if they aren't linear. Even beyond human error, it seems that in many social science areas the data quality is poor enough that adding non-linearities can be seen, a priori, to be a bad thing to do.

Except of course if there is a firm reason to add a particular non-linearity to the problem.

I'm not familiar with the whole spectrum of models (regression models, beta distributions, some conjugate prior distributions, and some machine learning techniques is about all I know), so I can't confidently speak about the general case. But, extrapolating from what I've seen and known biases and incentives, I'm quite confident in predicting that generic models are much more likely to be overfitted than to have too few degrees of freedom.

Comment author: Lumifer 31 July 2014 02:46:23PM *  1 point [-]

I'm quite confident in predicting that generic models are much more likely to be overfitted than to have too few degrees of freedom.

Oh, I agree completely with that. However there are a bunch of forces which make it so starting with the publication bias. Restricting the allowed classes of models isn't going to fix the problem.

It's like observing that teenagers overuse makeup and deciding that a good way to deal with that would be to sell lipstick only in three colors -- black, brown, and red. Not only it's not a solution, it's not even wrong :-/

the data quality is poor enough that adding non-linearities can be seen, a priori, to be a bad thing to do.

Why do you believe that a straight-line fit should be the a priori default instead of e.g. a log or a power-law line fit?

Comment author: Stuart_Armstrong 31 July 2014 03:17:28PM 1 point [-]

Restricting the allowed classes of model isn't going to fix the problem.

I disagree; it would help at the very least. I would require linear models only, unless a) there is a justification for non-linear terms or b) there is enough data that the result is still significant even if we inserted all the degrees of freedom that the degree of non-linearities would allow.

Why do you believe that a straight-line fit should be the a priori default instead of e.g. a log or a power-law line fit?

In most cases I've seen in the social science, the direction of the effect is of paramount importance, the other factor less so. It would probably be perfectly fine to restrict to only linear, only log, or only power-law; it's the mixing of different approaches that explodes the degrees of freedom. And in practice letting people have one or the other just allows them to test all three before reporting the best fit. So I'd say pick one class and stick with it.

Comment author: othercriteria 31 July 2014 02:40:07PM 0 points [-]

I'm quite confident in predicting that generic models are much more likely to be overfitted than to have too few degrees of freedom.

It's easy to regularize estimation in a model class that's too rich for your data. You can't "unregularize" a model class that's restrictive enough not to contain an adequate approximation to the truth of what you're modeling.

Comment author: [deleted] 31 July 2014 09:20:28PM 2 points [-]

How do I account for how many models I've tested? No, really, I don't know what that'd even be called in the statistics literature, and it seems like if a general technique for doing this were known the big data people would be all over it.

Comment author: Stuart_Armstrong 08 August 2014 11:11:06AM 2 points [-]

What we're doing at the FHI is acting like a machine learning problem: splitting the data into a training and a testing set, checking as much as we want on the training set, formulating the hypotheses, then testing them on the testing set.

Comment author: Stuart_Armstrong 01 August 2014 03:11:41PM 2 points [-]

The Bayesian approach with multiple models seems to be exactly what we need. eg http://www.stat.washington.edu/raftery/Research/PDF/socmeth1995.pdf

Comment author: Stuart_Armstrong 07 August 2014 04:25:21PM 1 point [-]

Another approach seems to be stepwise regression: http://en.wikipedia.org/wiki/Stepwise_regression

Comment author: EHeller 07 August 2014 05:14:24PM *  4 points [-]

I see a lot of stepwise regression being used by non-statisticians, but I think statisticians themselves think its something of a joke. If you have more predictors than you can fit coefficients for, and want an understandable linear model you are better off with something like LASSO.

Edit: Don't just take my word for it, google found this blog post for me: http://andrewgelman.com/2014/06/02/hate-stepwise-regression/

Comment author: Lumifer 07 August 2014 05:38:45PM 1 point [-]

I concur. Stepwise regression is a very crude technique.

I find it useful as an initial filter if I have to dig through a LOT of potential predictors, but you can't rely on it to produce a decent model.

Comment author: [deleted] 07 August 2014 04:30:25PM 1 point [-]

So it wasn't as clear with the previous link, but it seems to me that the nth step of this method doesn't condition on the fact that the last n-1 steps failed.

Comment author: IlyaShpitser 31 July 2014 08:46:02PM *  2 points [-]

If you array the full might of statistics/machine learning/knowledge representation in AI/math/signal processing, and took the very best, I am very sure they could beat a linear model for a non-linear ground truth very easily. If so, maybe the right thing to do here is to emulate those people when doing data analysis, and not use the model we know to be wrong.

Comment author: Stuart_Armstrong 01 August 2014 02:31:54PM 1 point [-]

Proper Bayesianism will triumph! But not in the hands of everyone.