How to ignore an attribute, i.e. remove an attribute?
robert
New Altair Community Member
I load three values:
- date
- closing price
- logreturn
The closing price will not be used for anything other than plotting it for illustrative purposes (with Series - multi). Therefore the process path branches ("Multiply" operation) and in one of the output paths, the subsequent step should be the removal of the closing price attribute (as I don't want to window that).
Any ideas? I browsed through the entire operator tree but didn't find anything. Because I think it is such a basic ETL operation, chances are I miss something as an otherwise enthusiastic new user of RapidMiner. A workaround would be to load the data twice (with different attribute selection in their respective SQL queries) but it would not be a nice solution.
- date
- closing price
- logreturn
The closing price will not be used for anything other than plotting it for illustrative purposes (with Series - multi). Therefore the process path branches ("Multiply" operation) and in one of the output paths, the subsequent step should be the removal of the closing price attribute (as I don't want to window that).
Any ideas? I browsed through the entire operator tree but didn't find anything. Because I think it is such a basic ETL operation, chances are I miss something as an otherwise enthusiastic new user of RapidMiner. A workaround would be to load the data twice (with different attribute selection in their respective SQL queries) but it would not be a nice solution.
Tagged:
0
Answers
-
Hello
You can use the "set role" operator and type "ignore" in the target role field.
I made an example here...
<shameless plug>
http://rapidminernotes.blogspot.com/2011/07/ignoring-many-attributes.html
</shameless plug>
regards
Andrew0 -
Andrew, thanks, this is awesome in some unexpected way :-)
I wonder how people live without this feature as it seems so fundamental. Or is it customary for people to heavily massage their data before it hits RM?
As you say in your blog, when I typed in "ignore" in the GUI, I needed to click on the text field for each letter :-) RapidMiner's immune system tried to stop me in vain :-) I didn't need to resort to the xml editing. So it worked like a charm.
Is it trivial to implement a "Remove attribute" operator, or better, to change the Set Role operator such that ignore is selectable? Probably a Groovy script would do, but is it possible to make it into something that becomes part of the operator tree (for reuse)? I have the R component installed, so I guess that would be one way...
Thanks again!0 -
Hello Robert,
You could also use the "select attributes" operator and set "invert selection". This deletes attributes.
You could also use the "select by weights" operator and provide a set of weights.
regards
Andrew
0 -
Thanks Andrew, I don't know how I missed it :-)0
-
thx Andrew, nice one :-)0