[SOLVED] How to run the same process for different examples automatically

bzavalabzavala Member Posts: 19 Contributor II
edited November 2018 in Help
Hi! I need to run the same process for different tables. The tables differs between them in one attribute, for example, table 1 has value 1 on attributte 1, table 2 has value 2 on attribute 1, and so on. I have a huge table too that has all the "little" tables on it. What I was doing was put a filter example box at the beginning of the process and changing the value of the filter of the attribute 1 and runing the process over and over, but I have to do that over 70 times and is not practical. How can I do that automatically?

Hopefully you could give me a detailed description of how to do that, where put the boxes, etc, because I have too little experience using rapidminer.

PD: I read about Loop Examples operator but I dont understand how it works  :'(

Thanks you in advance

Answers

  • blatooblatoo Member Posts: 32 Contributor II
    Can you give a concrete example? I can not understand your question very well.

    Do you means you want to separate a big table into many small tables depending on the different values of "attribute 1"?
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,503 RM Data Scientist
    Hi,

    there are two things which may help you.
    1. Macro - See https://www.youtube.com/watch?v=K4aBq-apeqM
    2. Branch Opertor - using it you can do if-else constructs.

    ~Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • bzavalabzavala Member Posts: 19 Contributor II
    I have a process that I want to run only for examples who has the same value in a particular attribute each time. So what I was doing was using a filter example box to set a particular value each time and runing the process over and over changing the value of the filter.

    For example, having

    att1  att2     att3
    1        4         1
    1        1         2
    3        1         1
    3        1         1

    I want to run the process  considering only the examples that  have value 1 on att 1, then, with value=3 and so on.  I have 70 different values so I want to found a way to make it automatically. I would expect 70 different outputs.

    Thanks you
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,503 RM Data Scientist
    Loop Values is the operator to go for.

    ~Martin
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • aruberutouaruberutou Member Posts: 23 Contributor II

    Hi,

    I recently faced a similar problem. I hope you dont mind, Martin, if I expand on your post.

    Im not very sophisticated, but I think this should help get you started.

    #1: Make a list of attributes, either in RM or imported as an excel/csv file. I would suggest recoding 1:70
    #2: Connect that to Loop Values, selecting the column you just imported
    #3: Within Loop Values, add Filter Examples. Set att1 = %{loop_value}
    #4: [If you want separate processes for each] connect Filter Examples to Branch Operator Select Subprocess, using %{loop_value} once again. Of course, be sure that the subprocess number matches the numerical value of att1.

    This will then run separate processes for each value of att1. You can then recombine these outputs using Append.

    Hope that helps!
  • MartinLiebigMartinLiebig Administrator, Moderator, Employee, RapidMiner Certified Analyst, RapidMiner Certified Expert, University Professor Posts: 3,503 RM Data Scientist
    aruberutou wrote:

    Hi,

    I recently faced a similar problem. I hope you dont mind, Martin, if I expand on your post.

    Im not very sophisticated, but I think this should help get you started.

    #1: Make a list of attributes, either in RM or imported as an excel/csv file. I would suggest recoding 1:70
    #2: Connect that to Loop Values, selecting the column you just imported
    #3: Within Loop Values, add Filter Examples. Set att1 = %{loop_value}
    #4: [If you want separate processes for each] connect Filter Examples to Branch Operator Select Subprocess, using %{loop_value} once again. Of course, be sure that the subprocess number matches the numerical value of att1.

    This will then run separate processes for each value of att1. You can then recombine these outputs using Append.

    Hope that helps!
    I really LOVE that you expand my post! Good work! Thanks.
    As a side note: It would be useful if you can add the XML of an example process.
    - Sr. Director Data Solutions, Altair RapidMiner -
    Dortmund, Germany
  • bzavalabzavala Member Posts: 19 Contributor II
    Thanks a lot for your very detailed answer  ;D :D;)
Sign In or Register to comment.