Options

Macro with example index more than one

faizhalasfaizhalas Member Posts: 7 Contributor I
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?
Tagged:

Best Answer

  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    Solution Accepted
    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

Answers

  • Options
    BalazsBaranyBalazsBarany Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert Posts: 955 Unicorn
    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
  • Options
    faizhalasfaizhalas Member Posts: 7 Contributor I
    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?
  • Options
    faizhalasfaizhalas Member Posts: 7 Contributor I
    thanks! this is so helpful
Sign In or Register to comment.