varun teja A
varun teja A

Reputation: 41

model to Forecast an hourly time series

I am working on sales data of a vending machine. It consists of sale and time of sale. I am working on predicting sales on the next day on hourly basis. My work: I have created an hourly time series with sales during the interval summed up. It looks like this

head(sales)

                    [,1]

2015-12-01 00:00:00    0

2015-12-01 01:00:00    0

2015-12-01 02:00:00    0

2015-12-01 03:00:00    0

2015-12-01 04:00:00    0

2015-12-01 05:00:00  280

class(sales)
[1] "xts" "zoo"

I observe there is a pattern in sales over a day and also over a week. I tried using ets but cannot interpret the results. an outcome with predictions of next day sales is what i am looking for. Thank you

Upvotes: 2

Views: 1769

Answers (1)

Altons
Altons

Reputation: 1424

The one issue you have going into forecasting sales (or any other variable) by hour is that when you go down to that level of granularity you run into issues of not having enough data or no data at all which in turn produce very low accuracy predictions.

You did not specify whether you are forecasting total sales or number of sales but I think the advice will work for both scenarios.

I suggest you model your daily sales (sales aggregate to daily level) and then create a profile matrix that allocates the daily forecast into hourly buckets.

You can be very creative on how you create your profile matrix:

  • Base on the last 10 days by day of the week
  • Based on last year sales for the same days
  • split by region

Hope it helps

Upvotes: 2

Related Questions