The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
How to predict the bilateral trade volume with matrix data in the time series?
ChristineJ
Member Posts: 6 Learner II
in Help
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
the screenshot of bilateral trade data
Tagged:
1
Best Answer
-
BalazsBarany Administrator, Moderator, Employee-RapidMiner, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 UnicornHi @ChristineJ,
this is mostly a data representation problem.
You should be able to process the matrix data with the Unpivot and Generate Attributes operators to get the data in the following form:
Argentina-Australia 76191
Argentina-Austria 71658
etc.
Then add the year from the table metadata.
Loop Values over the country combinations (e. g. Argentina-Australia is one combination and you have 18 yearly data points). At this stage, this is a simple time series prediction problem.
You might want to check out the Time Series course on Academy: https://academy.rapidminer.com/courses/time-series-analytics
Regards,
Balázs7
Answers
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 ?
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
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!
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
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
Kind Regards
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
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.
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