Macro with example index more than one
faizhalas
New Altair Community Member
Dear RapidMiner community,
I currently want to extract some rows with filter and use Extract macro. Since the example index just gives me an example, is it possible to provide a range of examples (e.g. row number 1-15) or some rows (1,4,7, and 15)? Maybe is there another option for this problem?
I currently want to extract some rows with filter and use Extract macro. Since the example index just gives me an example, is it possible to provide a range of examples (e.g. row number 1-15) or some rows (1,4,7, and 15)? Maybe is there another option for this problem?
0
Best Answer
-
If you aggregate a nominal attribute with the "concatenation" function, you'll get the result in this form:
word1|word2|word3|word4
This is also usable as a regular expression in Select Attributes. So if you filtered the top word from the wordlist, aggregate them in this way, Extract Macro on the result, you'll be able to use the macro value as the attribute filter regular expression.
Regards,
Balázs1
Answers
-
Hi!
The value of a macro is just a string. If you want to use Extract Macro, you need to set up that string yourself in the example set.
You an use Filter Example Range to get rows 1-15, or Filter Examples for selecting rows based on their content. Then probably Aggregate to group together all the values to one value. For strings, you can use the concatenation function, for numbers there is a large number of available functions.
Regards,
Balázs1 -
So I have wordlist. I filtered it just the top 15. I also have the word vector but the columns are too much. I need to filter the columns based on the wordlist which are will be dynamic depends on the documents. Do you have any idea for this?0
-
If you aggregate a nominal attribute with the "concatenation" function, you'll get the result in this form:
word1|word2|word3|word4
This is also usable as a regular expression in Select Attributes. So if you filtered the top word from the wordlist, aggregate them in this way, Extract Macro on the result, you'll be able to use the macro value as the attribute filter regular expression.
Regards,
Balázs1 -
thanks! this is so helpful0