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 clone a exampleSet [SOLVED]
Hi,
In the middle of my process I have a 'loop examples' operator.
In each iteration I must change temporarily the values of some attributes of current example and I want 'rollback' this changes in the end of iteration.
I have the problem that the changes that I did is always reflected in main exampleSet (of the loop).
How can I do to clone the current example ?
Thanks,
Sérgio
In the middle of my process I have a 'loop examples' operator.
In each iteration I must change temporarily the values of some attributes of current example and I want 'rollback' this changes in the end of iteration.
I have the problem that the changes that I did is always reflected in main exampleSet (of the loop).
How can I do to clone the current example ?
Thanks,
Sérgio
0
Answers
one possibility to keep your original ExampleSet is to use the Multiply-Operator before you enter the loop.
By Generate Copy you can keep single attributes if this would be sufficient for you.
Do you really need to change the attribute values?
By using Extract Macro you could fetch the attribute value of the certain attribute for the actual example (addressed by: %{example} )
If you then want to use this value, e.g. to compute a new value you can address this macro by: %{macro_name}.
Hope this helps.
Cheers,
Edin
I workaround my problem by other way. The Generate Copy is not enough for my case, because my example set can have hundreds of attributes.
I thought that Rapid Miner had a very usefull clone example operator.
Thanks
Cheers,
Edin
I've probably got the wrong end of the stick, but I think the trick is to pass the original set round and round, like this. If you look at the log you'll see that 'att1' in each example got changed, and the change got rolled back, sort of anyway !
Good weekend
Thanks for your reply.
To explain better my problem I have this document:
http://www.lavradeirasarcozelo.com/extra/description.pdf
And the code of example of document:
Many thanks
Best Regards,
Sérgio
I've read your pdf ( it always helps to have clear examples like that ), and think we are nearly there!
For each Example Row
Clone the original Example table
Change the Row in the Clone
Aggregate the Clone
Store the Clone and Aggregate So the real answer to your question is that you can also Clone an example set by using the 'set data' operator, the trick, as hinted above, is to pass the original set round and round. One set goes in, two come out.
Hope that's closer to it!
PS There are loads of other ways to copy data tables in RM, I draw this to your attention only because it is less obvious!
Hi haddock
Ok! Finally I already understand with your last code.
Many thanks for your help!
Best Regards,
Sérgio