# Overfitting on purpose

Would it make sense to overfit a model on purpose?

Say I have a use case where I know the data will not vary much respect to the training data.

I’m thinking here about traffic prediction, where the traffic status follows a fixed set of patterns

• morning commute
• night time activity
• and so on.

These patterns won’t change much unless there is a sudden increase of car users or major changes in the road infrastructure. In this case I would like the model to be as biased as possible towards the patterns it learned in current data, assuming that in the future the pattern and the data will be very similar.

In General it does not make sense to overfit your data on purpose. The problem is that it is difficult to make sure that the patterns also appear in the part which is not included in your data. You have to affirm that there are pattern in the data. One possibility of doing so is the concept of stationarity.

What you describe reminds me of stationarity and ergodicity. From a contextual side/ business side you assume that your time series follows certain patterns. These patterns are called stationarity or ergodicity.

Definition stationarity:

A stationary process is a stochastic process whose unconditional joint probability distribution does not change when shifted in time. Therefore parameters such as mean and variance also do not change over time.

Definition ergodicity:

An ergodic process is a process relating to or denoting systems or processes with the property that, given sufficient time, they include or impinge on all points in a given space and can be represented statistically by a reasonably large selection of points.

Now you want to make sure that it really follows these certain patterns. You can do this, e.g. with Unit root test (like Dickey-Fuller) or Stationarity test (like KPSS).

Definition Unit root test:

$H_0:$ There is a unit root.

$H_1:$ There is no unit root. This implies in most cases stationarity.

Definition Stationarity test:

$H_0:$ There is stationarity.

$H_1:$ There is no stationarity.