1. Help Center
  2. Machine Learning

How would you detect Overfitting in Linear Models?

The optimal answer is of course train/test - split.

But depending on what you test and how you test different hypotheses via you regression model you might eventually start to overfit your test data or at the least you “burn” some information from your dataset.

You might want to look into information criteria like AIC and BIC which weigh off the goodness of fit with the complexity of your model (i.e. degrees of freedom).

Another approach that comes to mind is simulation. That is you could run 1000 simulations where on each run you shuffle all the dependent variables and regress them on your independent variables. You could then take the average of all the R^2. Despite of only fitting noise that way you will find that your model on average shows some R^2. The more complex model you fit to the shuffled data, the more R^2 you will observe on average despite only fitting noise.

The average R^2 of these simulations can therefore serve as a threshold to overcome by the model when seeing the real - unshuffled - data