none
Time Series to perform cross prediction

    Question

  •  

    Hi,

    I want to know how perform cross prediction in Time series. I have two separate time series to predict sales of Bike and to predict sales of Car.

     

    As sales of Car is influenced by sales of Bike, I want to predict sales of Car based on the sales of Bike. How to relate these two different time series?

    Thanks

    Tuesday, October 28, 2008 8:34 AM

Answers

  • Are you running Standard Edition of SQL Server Analysis Services? If yes, support for cross prediction is not available in that edition.

     

    Have you marked both the columns "Predict" and not "PredictOnly"? "PredictOnly" disables cross prediction.

     

    Are you using "ARTXP" algorithm? "ARIMA" does not support cross prediction and "MIXED" allows cross prediction only for the first few steps where ARTXP has more weight.

     

    It's also possible that the algorithm did not find any correlation between the two series based on the data presented. Or in case of very highly correlated series, "BikeSales" itself is sufficient for prediction and "CarSales" does not add any additional information.

     

    Thanks

    Shuvro

    Tuesday, November 04, 2008 6:56 PM

All replies

  • Assuming your data schema is as follows:

    (Time, CarSales, BikeSales)

     

    Please do the following:

    1. You have to be running Enterprise or Developer edition of Analysis Server which supports cross prediction.

    2. Create a single mining structure/model which includes both the series.

    3. Mark both the columns as "Predict" (and not "PredictOnly")

     

    This should build a model which relates the two different time series.

     

    If you have a different schema, please do let me know.

     

    Another thing to consider if you're running SQL Server 2008 is the algorithm used for prediction. If you use ARTXP, the algorithm supports cross prediction for all time steps. If you use ARIMA, cross prediction is not supported. If you use MIXED (which is the default), the initial predictions will be more weighted towards ARTXP and hence will have cross prediction. The long term predictions will be almost entirely ARIMA and will not have prediction.

     

    Hope this helps

    Shuvro

    Tuesday, October 28, 2008 7:17 PM
  • Hi  Shuvro,

    Thanks for the reply. I am using SQL 2008 RTM version. MIXED Algorithm is used for prediction. I am trying to create mining structure from Cube. My cube contains 2 dimensions DimDate and DimRegion and has two measures. SalesCar and SalesBike.

     

     

    I have seleced DimRegion as case and added both the measures as Nested tables, and for both the measures, Date_Key i have set as Key_time. and I get the below error:

     

    Error 10 Error (Data mining): Multiple Key Time columns were found in mining structure for the 'DIM REGION' time series model. A mining structure containing a time series model can have only one Key Time column.  0 0 

     

    I tried keeping the DateKey for SalesBike as "Key" and for SalesCar as "Keytime", i get below error:

     

    Error 8 TableMiningStructureColumn [DIM REGION].[Sales Bike] : You must mark one key column as Key Time for nested table column Sales Data.   0 0 

     

    Thanks.

     

    Wednesday, October 29, 2008 8:23 AM
  • Multiple nested table with different time key columns are not supported. You'll have to add both SalesCar and SalesBike to the same nested table and mark the DateKey in that nested table as "Key Time".

     

    Shuvro

    Wednesday, October 29, 2008 5:41 PM
  •  

    Hi,

    I was trying the same, with OLEDB Data base. I had created two mining structures, First one only with SalesCar Series, Second with both SalesCar and SalesBike Series ( Both SalesCar and SalesBike marked as Predict). When I compare the resut of both the mining structures, the predicted values looks same. I was expecting there will be some variation in Values predicted for SalesCar after Including SalesBike in the mining structure. Am I missing something?

    How does cross prediction algorithm work?

    Thanks,

     

    Tuesday, November 04, 2008 8:56 AM
  • Are you running Standard Edition of SQL Server Analysis Services? If yes, support for cross prediction is not available in that edition.

     

    Have you marked both the columns "Predict" and not "PredictOnly"? "PredictOnly" disables cross prediction.

     

    Are you using "ARTXP" algorithm? "ARIMA" does not support cross prediction and "MIXED" allows cross prediction only for the first few steps where ARTXP has more weight.

     

    It's also possible that the algorithm did not find any correlation between the two series based on the data presented. Or in case of very highly correlated series, "BikeSales" itself is sufficient for prediction and "CarSales" does not add any additional information.

     

    Thanks

    Shuvro

    Tuesday, November 04, 2008 6:56 PM
  • I was using MIXED. I changed it to ARTXP now. This shows some variation in Values predicted by the two series. Looks like this is working. Need to check the data.

     

    Thanks for the help..

    Wednesday, November 05, 2008 8:11 AM