0
$\begingroup$

I am reviewing a number of different sites which all point to the variables being stationary prior to running the model. The authors tend to split the data into test and training sets prior to differencing, but I've never seen a reason why you would do it that way. For small sample sets, you would lose a degree of freedom. Is there a reason to do the split prior to differencing or is it ok to do it afterward?

$\endgroup$
0
$\begingroup$

If you don't split it before, training data spill into test data.

That leakage may or may not bias your performance: do you expect to always train on the previous timepoints prior to deploying you model? If yes, then the performance estimate is not biased (it's the common usage of the model), but if not, i.e. you are going to predict new, never saw before timeseries with it, then you would have no way of knowing the last timestep of "training" data.

A rule of thumb, though, if you are concerned about losing a single degree of freedom, then you are probably out of degrees-of-freedom already.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.