RapidMiner

Select Attributes not excluding deselected attribute

SOLVED
Regular Contributor

Select Attributes not excluding deselected attribute

Hi

 

For some reason my code becomes corrupt when pasting, so I have included as much info as possible to try and help with this issue:

 

A screenshot of the process below shows how the data is generates, and id attribute is then added, the data is filtered to take the first row out. The Select Attribute process is used to deslect the ID attribute, the Remove Attribute is used to further try and take out the id that has been generated.   Screen Shot 2017-09-13 at 8.35.54 AM.png

However in the output fields the id attribute is still present. 

Screen Shot 2017-09-13 at 8.40.44 AM.png

 How do I effectivly remove the id attribute from the final output?

 

 

<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
  <operator activated="true" class="generate_data" compatibility="7.6.001" expanded="true" height="68" name="Generate Data" width="90" x="447" y="187">
    <parameter key="target_function" value="random"/>
    <parameter key="number_examples" value="100"/>
    <parameter key="number_of_attributes" value="5"/>
    <parameter key="attributes_lower_bound" value="-10.0"/>
    <parameter key="attributes_upper_bound" value="10.0"/>
    <parameter key="gaussian_standard_deviation" value="10.0"/>
    <parameter key="largest_radius" value="10.0"/>
    <parameter key="use_local_random_seed" value="false"/>
    <parameter key="local_random_seed" value="1992"/>
    <parameter key="datamanagement" value="double_array"/>
    <parameter key="data_management" value="auto"/>
  </operator>
</process>
<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
  <operator activated="true" class="generate_id" compatibility="7.6.001" expanded="true" height="82" name="Generate ID" width="90" x="581" y="187">
    <parameter key="create_nominal_ids" value="false"/>
    <parameter key="offset" value="0"/>
  </operator>
</process>
<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
  <operator activated="true" class="filter_example_range" compatibility="7.6.001" expanded="true" height="82" name="Filter Example Range" width="90" x="715" y="187">
    <parameter key="first_example" value="1"/>
    <parameter key="last_example" value="1"/>
    <parameter key="invert_filter" value="false"/>
  </operator>
</process>
<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
  <operator activated="true" class="select_attributes" compatibility="7.6.001" expanded="true" height="82" name="Select Attributes" width="90" x="1050" y="340">
    <parameter key="attribute_filter_type" value="all"/>
    <parameter key="attribute" value="requests"/>
    <parameter key="attributes" value=""/>
    <parameter key="use_except_expression" value="false"/>
    <parameter key="value_type" value="attribute_value"/>
    <parameter key="use_value_type_exception" value="false"/>
    <parameter key="except_value_type" value="time"/>
    <parameter key="block_type" value="attribute_block"/>
    <parameter key="use_block_type_exception" value="false"/>
    <parameter key="except_block_type" value="value_matrix_row_start"/>
    <parameter key="invert_selection" value="false"/>
    <parameter key="include_special_attributes" value="false"/>
  </operator>
</process>
<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
  <operator activated="true" class="select_attributes" compatibility="7.6.001" expanded="true" height="82" name="Select Attributes (2)" width="90" x="849" y="136">
    <parameter key="attribute_filter_type" value="subset"/>
    <parameter key="attribute" value="requests"/>
    <parameter key="attributes" value="label|att5|att4|att3|att2|att1"/>
    <parameter key="use_except_expression" value="false"/>
    <parameter key="value_type" value="attribute_value"/>
    <parameter key="use_value_type_exception" value="false"/>
    <parameter key="except_value_type" value="time"/>
    <parameter key="block_type" value="attribute_block"/>
    <parameter key="use_block_type_exception" value="false"/>
    <parameter key="except_block_type" value="value_matrix_row_start"/>
    <parameter key="invert_selection" value="false"/>
    <parameter key="include_special_attributes" value="false"/>
  </operator>
</process>
<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
  <operator activated="true" class="remove_attribute_range" compatibility="7.6.001" expanded="true" height="82" name="Remove Attribute Range" width="90" x="1050" y="136">
    <parameter key="first_attribute" value="1"/>
    <parameter key="last_attribute" value="1"/>
  </operator>
</process>

 

4 REPLIES
FBT
Super Contributor
Solution
Accepted by topic author robin
2 weeks ago

Re: Select Attributes not excluding deselected attribute

Have you tried setting the role of this attribute to "regular" with the "Set Role" operator prior to filtering it out?

Highlighted
Regular Contributor

Re: Select Attributes not excluding deselected attribute

Thanks that worked perfectly! 

 

Would you know when I save the CSV out of this process do  how to exclude the column headers from being included in the file?


 

Regular Contributor

Re: Select Attributes not excluding deselected attribute


robin wrote:

Thanks that worked perfectly! 

 

Would you know when I save the CSV out of this process do  how to exclude the column headers from being included in the file?


 


lol, sometimes too burried in the rabbit hole to see my own mistakes. 

FBT
Super Contributor

Re: Select Attributes not excluding deselected attribute

You would just need to uncheck the "write attribute names" option in the operator's panel. See screenshot below.

WriteCSV.png