Altair RISE
A program to recognize and reward our most engaged community members
Nominate Yourself Now!
Home
Discussions
Community Q&A
Macro with example index more than one
faizhalas
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?
Find more posts tagged with
AI Studio
Macros
Accepted answers
BalazsBaranyRM
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ázs
All comments
BalazsBaranyRM
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ázs
faizhalas
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?
BalazsBaranyRM
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ázs
faizhalas
thanks! this is so helpful
Quick Links
All Categories
Recent Discussions
Activity
Unanswered
日本語 (Japanese)
한국어(Korean)
Groups