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
"Loop over different values of a constant used in Generate Attributes?"
My apologies if the answer to this exists somewhere -- if it does, I wasn't able to find it.
I have a "Generate Attributes" block in my process that creates a derived attribute with an equation that looks something like this:
Foo = 3*Bar + 2*Baz
Foo is then later used in classification. I'd like to set up a loop of some sort to try all combinations of constants in this equation, e.g., 1*Bar + 1*Baz, 2*Bar + 1*Baz, etc. Essentially what "Optimize Parameters" does, but over some constants (macros?) that I can use within Generate Attributes.
Any thoughts on how to accomplish this?
I have a "Generate Attributes" block in my process that creates a derived attribute with an equation that looks something like this:
Foo = 3*Bar + 2*Baz
Foo is then later used in classification. I'd like to set up a loop of some sort to try all combinations of constants in this equation, e.g., 1*Bar + 1*Baz, 2*Bar + 1*Baz, etc. Essentially what "Optimize Parameters" does, but over some constants (macros?) that I can use within Generate Attributes.
Any thoughts on how to accomplish this?
Tagged:
0
Answers
even better: I found the problem interesting enough to spend a bit of time for some serious process design
The result is a nice little process creating all linear combinations for two attributes by using a specified number of coefficients for each of both and generating one new attribute for each combination (why I would do this and not let the learner doing this is another question ;D )
Ok, I have uploaded the final process to myExperiment. You can download it with our Community Extension (search the forum for a description how). The process is named "Create Linear Combinations" ( http://www.myexperiment.org/workflows/2061.html )
Have fun optimizing it for your setting. Cheers,
Ingo
On a related note, to do something like this task, I have to take my existing process and make it the inner process of the Loop operator. I can do that with a cut & paste, but then I end up with two different copies of the inner process, and if I change one the other doesn't change, so I have to remember to make changes in both places. Is there a way to call my existing process as a "subroutine" from within the inner process...?
There is an operator called "Execute Process" in the group Utility - Execution which does exactly that. You could also simply store a process into your repository and drag it into a new process - RapidMiner will automatically create an "Execute Process" operator for this subroutine then. You can also parameterize this subprocess by propagating macros inside of it and if you want event the meta data propagation during process design can be executed.
Have fun,
Ingo