4 ms·
Data set sizes have changed. That can make this issue (the tendency of OLS regression to overfit) less or more of a problem. If you have 100 observations and 1
by michaelochurch 12y ago
Data set sizes have changed. That can make this issue (the tendency of OLS regression to overfit) less or more of a problem.
If you have 100 observations and 10 dimensions (N = 100, p = 10) then OLS can overfit, especially if the predictors are highly correlated or there's a lot of noise on the response. If you have N = 10^6, p = 10, then probably not. If you have N = 10^6 and p = 10^5, then overfitting is again a danger. If you have N = 10^5 and p = 10^6, then you can't even do an OLS regression because, when p > N, it involves inverting a singular matrix (and, to boot, a gigantic one). The rough guideline is:
N/p > 100: very low danger of overfitting.
N/p < 100, > 10: low danger of overfitting.
N/p < 10, > 1: high danger of overfitting. Use regularization (ridge, Lasso, etc.)
N/p < 1: OLS not even well-defined. Regularization mandatory.
Equal weights is a primitive way of regularizing. You lose accuracy in the zero-noise case but get a model that is more likely to be "wrong" in a way that is harmless in prediction (because of correlations in predictors). These days, people are more likely to use ridge regression or, if they want a parsimonious model (few nonzero coefficients) they'll use Lasso or the elastic net.
Though you almost never see equal weights in a regression setting, you do see equal-weight constraints in neural network architectures (e.g. convolutional neural nets) to prevent overfitting. In neural nets, this usually can be done with absolutely no loss of accuracy because ANNs are already so highly parameterized that some form of regularization (weight decay, equal-weight constraints, early stopping) is mandatory.
- terranstyler 12y agoI was asking about that in another thread. Do you have any references about you N/p rule of thumb? Thanks in advance!
- michaelochurch 12y agoThat N/p rule of thumb is ultimately subjective, except for the fact that when N/p < 1, you can't use OLS anymore (because there is an infinitude of zero-training-error solutions). It depends on correlations of predictors and signal/noise ratio as well. Those are just approximate guidelines.