How to predict the bilateral trade volume with matrix data in the time series?

ChristineJChristineJ Member Posts: 6 Contributor I
Hi,I want get the prediction of the given year bilateral trade volume basing on the matrix data of past 18 years .For example, there are 18 matrix(from year 2001 to 2018),how to predict the trade volume among the 50 trade partners for the year of 2020,or 2021,2020,etc...How can I operate this project by Rapidminer?Thanks a lot!

the 
screenshot of bilateral trade  data

Best Answer

Answers

  • ChristineJChristineJ Member Posts: 6 Contributor I
    Excllent answer! Thank you for your solution and time. Unpivot is the same as the operator of  de-pivot? Is there any leanrning resource about it ?
  • ChristineJChristineJ Member Posts: 6 Contributor I
    BalazsBarany,
    Excllent answer! Thank you for your solution and time. Unpivot is the same as the operator of  de-pivot? Is there any leanrning resource about it ?
  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi @ChristineJ,

    oh yes, sorry. It's of course De-Pivot. When you add the operator to your process and look into the help panel, there's an example process. It illustrates the usage well. 

    Regards,
    Balázs
  • ChristineJChristineJ Member Posts: 6 Contributor I
    Hi@BalazsBarany,
    I did the data representation.In the prcoess of rapidminer, I got the problem in windowing operator(see picture),i have tried to fix the indices attribute and it didnot work.Could you help me to have a look? Big thanks!
  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi,

    I don't see your entire process. How did you structure it? Are you doing the data processing for each country combination separately? 

    I would start with something like Loop Values on the country-country combination attribute. Inside the loop you only should have the different year rows from that combination, so the year would be actually monotonically increasing (you might need to sort the data). 

    Regards,
    Balázs
  • ChristineJChristineJ Member Posts: 6 Contributor I
    Hi@BalazsBarany,
    I sorted the data like the picture1 for the separated exampleset, I am Newbie of Rapidmine am and not sure it is correct or  not? Also,I tried to use this data in the Auto Model,it said it
     need at least 100 rows! 
     How to set the parameters of loop values ?Could you guide me in more detail? I am Big and big thanks!!!!


    Kind Regards
    Christine
  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi Christine,

    this is a straightforward time series dataset now. Well done!
    AutoModel is limited with time series, unfortunately. 

    What I would do is: 
    - Combine Economy and Partner to one attribute using Generate Attributes (Formula: ECONOMY + "-" + PARTNER)
    - Remove Economy and Partner
    - Keep the new attribute but assign a role like "dataset" to it so it's not disturbing the modeling
    - Mark the Trade Volume attribute as the label
    - Window the data as you already tried
    - Try a prediction model (e. g. Linear Regression, Support Vector Machine, Neural Net) on the data, possibly with sliding window validation (but you have very little data, unfortunately).

    Regards,
    Balázs
  • ChristineJChristineJ Member Posts: 6 Contributor I
    Hi BalazsBarany
    Thank you for your answer!! I will try your solution and I am think about maybe my examplesets are not suitable for the rapidminer since the data is too little.
  • BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Hi @ChristineJ,

    such a short time series is not good enough for AutoModel. But you have yearly data and I guess you'll be able to capture general trends most of the time. You might want to create yearly aggregations like overall trade volume and country trade volume sum and calculate the ratio of (trade volume with this partner) / (country trade volume) per year. These might help your models. 

    Of course you won't be able to predict sudden trend changes like an economic crisis just from the past data. But you might get a good estimate for many countries for a few years.

    Regards,
    Balázs
Sign In or Register to comment.