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
[SOLVED] Loop attributes
Hi,
I am working with a dataset containing 60 attributes, each having 700 examples (and no missing values).
Attribute types are either real oder integer.
10 attributes (allways the same ones) are "normal", the remaining 50 are potential "label" attributes.
What I want to do is pick 1 of the remaining 50 attributes, set it as label, run the now 11 attributes through a Linear Regression and store the result.
My problem is that I dont want to do this 50 times manually (select a new label attribute, rename the store operator and run the process).
So my question is: Is it possible to automatically loop through the 50 potential labels and store each result file in the same folder (ideally having the name of the label) with the help of a loop operator (so i will only have to start the process once and get 50 result files out of that).
Ps.: I have allready seen the loop operators in RM, but did not have time to test things out yet.
I am working with a dataset containing 60 attributes, each having 700 examples (and no missing values).
Attribute types are either real oder integer.
10 attributes (allways the same ones) are "normal", the remaining 50 are potential "label" attributes.
What I want to do is pick 1 of the remaining 50 attributes, set it as label, run the now 11 attributes through a Linear Regression and store the result.
My problem is that I dont want to do this 50 times manually (select a new label attribute, rename the store operator and run the process).
So my question is: Is it possible to automatically loop through the 50 potential labels and store each result file in the same folder (ideally having the name of the label) with the help of a loop operator (so i will only have to start the process once and get 50 result files out of that).
Ps.: I have allready seen the loop operators in RM, but did not have time to test things out yet.
Tagged:
0
Answers
Best,
Marius
But I can't seem do get it working.
Could anyone explain a little more detailed (or give me a tutorial) on how the loop operators work?
Edit: to be more precise: I selected a subset of attributes in the Loop Attributes operator and now want it to set the one it has selected right in this loop as label
Searching this forum for 'loop attributes' may help, but here's a link that may be useful anyway.
http://rapid-i.com/rapidforum/index.php/topic,2351.msg9346.html#msg9346
Hope so.
What I managed to build is the following (still not working) Idea behind this:
First i take my dataset and select all possible lable attributes, give them into the loop and set one as lable.
At the same time I load the dataset a second time within the loop, select all the "all time variables" and join them to a number of new datasets equal to the possible lable attributes, each set containig one different lable and the same "all timers". But this process just runs until I force-close the program.
I'm sorry for all the trouble my lack of skills might cost and I really appreciate your help!
Ps.: I did a forum search for "loop attributes" but didn't find something helpfull (at leat from my point of view)
I have tried several times over the week but I still allways condemned what I had because nothing worked.
It may sound a little desperate at this point, but as I start to feel incredibly stupid each time I open Rapidminer because the result is probably pretty simple and I just can't figure it out, so: Could someone please pass me some XML-Code that might work on the problem described in post 1?
That would be really awesome!
Ps.: And yes, I have searched the forums and google and work with the Loop Attributes and Work on Subset operators
You can do it with loop attributes and macros, like this.
As an aside I would you urge to read the documentation, and work through the examples, rather than Google for an answer.
Just one (hopefully) last thing:
Could you explain what happens inside the "Work on subset" operator? The rest is clear to me.
You can see that the process just thins down the attribute set to 1 label and the same 5 attributes, and logs that; so just before that log operator you can do your learning, or optimisation, or whatever. If you put a break before the log operator you can see the example set that would be available, like this.