"Loop Attribute Subsets -- -- Loop Order"

dragonedisondragonedison Member Posts: 17 Contributor II
edited May 2019 in Help
Dear everyone,

If there are 10 attributes input to operator "Loop Attribute Subsets", namely "att1", "att2", "att3"... ... how can I visualize what attributes are selected for processing each time, does it comply with a certain rule of order? And what's the rule?

Thanks.

Gary

Answers

  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi Gary,
    if you enter a breakpoint before the first inner operator, you can take a look at the example set to get to know which attributes are actually selected. Of course this follows a certain order, but it probably is more useful, that the operator provides a logging value that contains the number of current iteration, the number of currently selected attributes and the names itself as a string. You can use the Log operator to write them into a table that is updated while the process is executed.

    Greetings,
      Sebastian
  • dragonedisondragonedison Member Posts: 17 Contributor II
    Dear Sebastian,

    Thanks for your reply.

    I did try to use a "Log" operator, but it didn't tell me what attributes are selected. When I use a "Write as Text" operator, it generates the following messages,


    04.09.2010 16:42:00 Results of ResultWriter 'Write as Text (2)' [1]:
    04.09.2010 16:42:00 SimpleExampleSet:
    3959 examples,
    1 regular attributes,
    special attributes = {
        label = #10: Bind (binominal/single_value)
    }

    it tells me 1 attribute is selected, but hasn't told me its name.

    Could you please tell me which log operator I should use and how to set it by detail? Do I have to work in the code level? Thanks a lot!
  • landland RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 2,531 Unicorn
    Hi,
    I would refer to the sample processes and the online tutorial but I can't remember which one showed the log operator. So here's a process you should conclude from, how to use it:

    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.0">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.0.8" expanded="true" name="Process">
        <process expanded="true" height="161" width="547">
          <operator activated="true" class="retrieve" compatibility="5.0.8" expanded="true" height="60" name="Retrieve" width="90" x="112" y="30">
            <parameter key="repository_entry" value="//Samples/data/Iris"/>
          </operator>
          <operator activated="true" class="loop_attribute_subsets" compatibility="5.0.8" expanded="true" height="60" name="Loop Subsets" width="90" x="246" y="30">
            <process expanded="true" height="391" width="975">
              <operator activated="true" class="subprocess" compatibility="5.0.8" expanded="true" height="76" name="Do Something" width="90" x="45" y="30">
                <process expanded="true">
                  <portSpacing port="source_in 1" spacing="0"/>
                  <portSpacing port="source_in 2" spacing="0"/>
                  <portSpacing port="sink_out 1" spacing="0"/>
                  <portSpacing port="sink_out 2" spacing="0"/>
                </process>
              </operator>
              <operator activated="true" class="log" compatibility="5.0.8" expanded="true" height="76" name="Log" width="90" x="179" y="30">
                <list key="log">
                  <parameter key="Iteration" value="operator.Loop Subsets.value.iteration"/>
                  <parameter key="Number Of Attributes" value="operator.Loop Subsets.value.feature_number"/>
                  <parameter key="Attributes" value="operator.Loop Subsets.value.feature_names"/>
                </list>
              </operator>
              <connect from_port="example set" to_op="Do Something" to_port="in 1"/>
              <connect from_op="Do Something" from_port="out 1" to_op="Log" to_port="through 1"/>
              <portSpacing port="source_example set" spacing="0"/>
            </process>
          </operator>
          <connect from_op="Retrieve" from_port="output" to_op="Loop Subsets" to_port="example set"/>
          <connect from_op="Loop Subsets" from_port="example set" to_port="result 1"/>
          <portSpacing port="source_input 1" spacing="0"/>
          <portSpacing port="sink_result 1" spacing="0"/>
          <portSpacing port="sink_result 2" spacing="0"/>
        </process>
      </operator>
    </process>
    Anyway I would suggest going through the manual, online tutorials and all samples to get a fair understanding of RapidMiner.

    Greetings,
      Sebastian
Sign In or Register to comment.