RapidMiner 9.8 Beta is now available

Be one of the first to get your hands on the new features. More details and downloads here:

GET RAPIDMINER 9.8 BETA

How to back-transform differentiated time series data?

manfyemanfye Member Posts: 1 Newbie
edited April 30 in Help
I have done a ARIMA forecasting via a differentiated time series data with an ARIMA (1,1,0), but the data produced by rapidminer is the differentiated data, how do I back transformed it?
Tagged:

Answers

  • Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,530   Unicorn
    I am not entirely sure what you mean by this--perhaps you can elaborate or attach an example?
    @tftemme might be able to help out he has done a lot of the development of the series operators.
    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 1,087   Unicorn
    Hi @manfye,

    You said : 
    I have done a ARIMA forecasting via a differentiated time series data with an ARIMA (1,1,0)
    Do you mean that you have applied a differentiation method yourself before fitting your data with the ARIMA (1,1,0) model ?
    If yes, what differentiation method have you performed on your initial time series ?
     - subtraction
     - logarithm
     - a combination of both ?

    I think it is possible to back-transform your predictions by using :  
     -  the "cumsum" (cumulative sum) function in a Python script (in case of subtraction) - I envisage to use Python because I'm not aware of an equivalent function of "cumsum" in Rapidminer.
     - the "exp" function (in case of logarithm)
     - and finally a combination of "cumsum" and "exp" function in the third case above.

    To conclude, as Brian said, can you give more detail about your process and your data and ideally share them ?

    Regards,

    Lionel










  • lionelderkrikorlionelderkrikor Moderator, RapidMiner Certified Analyst, Member Posts: 1,087   Unicorn
    Hi again @manfye,

    I don't know why, but my intuition tells me that you used the subtraction differentiation method on your original time series.
    In this case, a priori you have obtained the predictions on the differentiated data by applying the ARIMA model.
    Thus you have obtained data like that : 


    Once you have these predictions on the differentiated data, you calculate the cumulative sum on this data and you add to this calculated time series, the first data point of your original time series - in other words, you integrate (from a mathematical point of view) your differentiated data -, and finally you retrieve the original time series with its forecast : 
     

    You can adapt the process in attached file to your own data. In my case, I used a time series called "Monthly milk production"
    available in RapidMiner repository.

    Hope this helps,

    Regards,

    Lionel

    PS : This process is using a Python script, thus, you first have to : 
     - install Python on your computer.
     - install the Python scripting extension from the MarketPlace.
     - set, in RapidMiner settings, the path where your Python.exe file is stored.


    Jasmine_
  • tftemmetftemme Administrator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, RMResearcher, Member Posts: 160  RM Research
    Hi @manfye

    To add on the nice and detailed answer of @lionelderkrikor

    ARIMA in itself performs a differentiation before fitting the model to it (the "I" in ARIMA stands for "Integrated"). The number of differentiations applied is specified by the parameter d of the (p,d,q) parameter set. So in your case it was differentiating the input series 1 time and then fitting a p=1, q=0 ARMA model to it. And when applied to perform the forecast the, the ARMA model is used to produce the forecasted values which are then integrated again automatically. 
    So in short you don't need to differentiate your input time series by yourself.

    Another point. If you still want to integrate a differentiated time series (or any time series by the way), we will have a new Integrate operator in the upcoming 9.7.0 version of RapidMiner Studio. Besides cumulative sum, you can also apply left and right riemann sums and the trapezoidal rule to calculate the integral.

    Hopes this helps
    Best regards
    Fabian
    lionelderkrikor
Sign In or Register to comment.