Wednesday, March 21, 2012

Problem with Historical Prediction in Sales Forecast Model

Hi,

I have built a time series model to forecast sales value

I have data from jan 2004 to jan 2006 and the sales value is

at a day level in my database. But I am aggregating it to month level in the

DSV of the mining model.

I am required to make only historical predictions using the

above model starting form jan 2004 to jan 2006 for every month.

I have set Historical_Model_Count

and Historical_Model_Gap parameter

values to 24 and 10 respectively, and trying to predict for the past few months

(PredictTImeseries(SalesValue,-1,1))

But its throwing me the following error

Error(Data Mining): A time series

prediction was requested with a start time further in the past than the

internal models of the mining model, Sales Forecast, specified in the

HISTORIC_MODEL_GAP and HISTORIC_MODEL_COUNT parameters can process

In fact it throws the above error irrespective of what the Historical_Model_Count and Historical_Model_Gap parameter values

are

I am not able to figure our why this problem is happening?

What should the parameter values for the above scenario?

It would also be helpful if I can get an explanation on how

these two parameters affect the historical predictions. I kind of understand

that these two parameters are important for historical predictions but don’t

know why or how.

You want the values of _Count to be 24 and _Gap to be 1. The _Count param says "make this many models", the "_Gap" param says "leave this many time slices between models". Your original parameter set was making models to 240 months (20 years!) in the past.

Note that the _Gap parameter is to be set such that you get a good idea of how the model will predict for the range that you need to predict for. For example, setting it to 1 gives you an indication of how well the model will predict the next step. Setting the parameters to _Count = 4 and _Gap=6 gives an idea of how the model will predict 6 steps into the future.

|||

Thanks Jamie,

I have few more clarification regarding time series.

Firstly

In my model the month level product sales value represented across 1st day of every month.So that the key time column is of datetime datatype containing a sequence of dates representing the 1st day of every month of the year.

Eg: 2006-01-01, 2006-02-01………. etc. all in (yy-mm-dd) format

But when I make prediction for next five months, though it makes monthly predictions the date part for the months are random whereas I expect the date part to be 1st of every month.What is the reason for this and how can I overcome it.

Secondly

Predicted sales values for some time period are negative though I do not have any negative value in the training data. What is the reason for this and how can I rectify it?

Thirdly

In one of your earlier posts you had said that the time series algorithm does not have any built in time intelligence but uses the key time column as a time sequence stamp. So If have to make predictions for a particular time period where the time slice for each time period is 25 days or 50 days etc, then I understand that the input data used to train the model should be in the same time sequence.

Or

Can I specify the span of the time period according to which the prediction needs to be made?

Basically how can I use the same time series model to make monthly, yearly, quarterly, daily or predictions or for custom time period like I have mentioned above.

|||Additional questions answered in other thread

No comments:

Post a Comment