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
UserError when settingSpecialAttribute()
Hi,
I'm testing my own operator and I've been getting a UserError while it is running. I've isolated the issue to the fact that I am modifying one of the attributes from a cloned version of the input exampleset. I am calling Attributes.setSpecialAttribute() within my operator. There error message states:
Certain operations are not allowed during the running of an experiment. These operations include the adding or the removal of an operator. Please do not perform these setup changes during runtime but stop the experiment, change the setup, and start it again.
Is there any "safe" mechanism for modifying the special/regular status of an attribute while an operator is running. In my code, I "clean up" when done by returning to the original state, but I can understand why the system would not like this behavior.
My reaons for changing the status of the Attributes.setSpecialAttribute() is because I am calling an operator (LinearRegression) within my operator and I want to suppress certain attributes for consideration in the regression. I also add a new attribute that is based on the output of yet another operator (DecisionTree). Once linear regression has produced the results I need, I simply return the exampleset to its original condition.
Right now, I can think of only one option:
Option: Break apart my "super" operator so that it can be executed in discrete steps of a "Rapid Miner" process. This would enable me to modify examplesets prior to calling the next operator in the process.
Of course I don't like this option because I have a difficult time manipulating examplesets (like adding new attributes) without using java directly. Any help/suggestions would be appreciated. Thanks!
mtgreen
I'm testing my own operator and I've been getting a UserError while it is running. I've isolated the issue to the fact that I am modifying one of the attributes from a cloned version of the input exampleset. I am calling Attributes.setSpecialAttribute() within my operator. There error message states:
Certain operations are not allowed during the running of an experiment. These operations include the adding or the removal of an operator. Please do not perform these setup changes during runtime but stop the experiment, change the setup, and start it again.
Is there any "safe" mechanism for modifying the special/regular status of an attribute while an operator is running. In my code, I "clean up" when done by returning to the original state, but I can understand why the system would not like this behavior.
My reaons for changing the status of the Attributes.setSpecialAttribute() is because I am calling an operator (LinearRegression) within my operator and I want to suppress certain attributes for consideration in the regression. I also add a new attribute that is based on the output of yet another operator (DecisionTree). Once linear regression has produced the results I need, I simply return the exampleset to its original condition.
Right now, I can think of only one option:
Option: Break apart my "super" operator so that it can be executed in discrete steps of a "Rapid Miner" process. This would enable me to modify examplesets prior to calling the next operator in the process.
Of course I don't like this option because I have a difficult time manipulating examplesets (like adding new attributes) without using java directly. Any help/suggestions would be appreciated. Thanks!
mtgreen
0
Answers
probably this error message results from an "ConcurrentModificationException". If such an exception occurs and is not catched, the process believes to have changed itself.
You probably will iterate over a collection from attributes and change the collection or its elements. This will cause such an exception. I had been trapped by this error message myself a few times in the past
Instead of setting the attributes' roles to special, you could simply remove them in the cloned exampleset. Later you could add the resulting attributes to the original example set, which still contains the unneeded attributes.
Greeting,
Sebastian