0
$\begingroup$

So, we are modeling a time series problem based on evaluating something at time x. We have several days with y time slots for each day (all days have the same slots), but time slots doesn't cover the whole day.

For example, we have 9-10am time slot, but we don't have 12-1pm time slot and we don't have time slots for the night time.

I don't think that inserting 0's for the not slots will affect any modelling, specially convolutional neural networks are just a composition of functions and will find the pattern anyway.

but can someone explain a bit better why or if there's any model that would benefit from adding 0's to the missing time slots?

$\endgroup$
4
  • $\begingroup$ It might be the right thing to do, but it depends on what you're modelling. For instance, suppose I am fitting a time series model to the S&P 500 index. Putting in zero will have a huge effect. Instead, if you're fitting a model to sales per hour, then zero is a reasonable value if missing. $\endgroup$
    – John
    Commented Nov 16, 2018 at 16:41
  • $\begingroup$ For the sales per hour case, how would it make the model better? is there any explanation? $\endgroup$ Commented Nov 16, 2018 at 17:35
  • $\begingroup$ Like I said, if you're dealing with something like sales per hour, then the data's not missing the way statisticians usually think about missing data. You observed zero sales. Beyond that, it's hard to say what is the optimal model to fit or anything else depending on what the data looks like and what you really are trying to do. $\endgroup$
    – John
    Commented Nov 16, 2018 at 17:41
  • $\begingroup$ Among things to consider: en.wikipedia.org/wiki/Zero-inflated_model $\endgroup$
    – John
    Commented Nov 16, 2018 at 19:23

1 Answer 1

0
$\begingroup$

A time-series is generally considered something to be evenly-spaced. Thus many time-series forecasting algorithms, like those in the forecast package, are not available to you unless you fill in the zeroes. You will need those in there before converting your data into a ts object. This is essential for the modeling of seasonality.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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