0
$\begingroup$

I am working on a project where I predict the total quantities sold at the ITEM/DAY leve. As for the model, I decided to with an ARIMA model (I'm using R). For guidance, I decided to follow the two tutorials below:

The first one here

The second one here

The thing that I am confused about is that, in the second one, they split the data into training and testing and they fit the model on the training set and did the evaluation on the test set (all that makes sense). However, in the first article, they didn't do the splitting.

Can anyone guide me through which is the correct approach and provide me with an explanation?

Thank you.

$\endgroup$
2
$\begingroup$

Splitting in Train and Test sets or not depends from the purpose of your analysis. You can follow a statistical approach or a machine learning approach.

In the classical, statistical approach, you fit a model on the whole batch of data. Your goal here is to check the sign of the variables' parameters, and whether they are significant or not. Scientifically speaking, each of those parameters represents the test of an hypothesis.

In the machine learning approach, you want a model that is good at predicting data it has never seen before. You don't care whether a given variable has a positive or negative association with you dependend variable, you don't care whether your parameters are 95% significant or not, you just care that the model predicts the output as precisely as possible.

So, the answer to your question is: it depends! What do you need your model for?

$\endgroup$
  • $\begingroup$ Thank u , that makes more sense . in my case my goal is to make a prediction and return predicted values in numeric format. $\endgroup$ – ilni Jun 3 at 16:46
  • 1
    $\begingroup$ In that case I would go for the machine learning approach $\endgroup$ – Leevo Jun 3 at 17:10
  • 1
    $\begingroup$ Absolutely agree. Let me add, that for instance in econometrics, you will be criticized if you don‘t use the full dataset (viz. if you set aside a test set). In the machine learning community, the same may happen if you don‘t use a test set. $\endgroup$ – Peter Jun 3 at 17:15
  • 2
    $\begingroup$ Thank you both for your time and answers , you made it very clear. $\endgroup$ – ilni Jun 3 at 17:19

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.