The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Backward Elimination - Attribute not found

MaerkliMaerkli Member Posts: 84 Guru
edited December 2018 in Help

When I excute the programm Backward Elimination, I receive the warning "Attribute not found". Within "Set Role" operator, I select MEDV as Attribute. Enclosed the XML file and the CSV file.

Thanks in advance for your support.

Maerkli

 

<?xml version="1.0" encoding="UTF-8"?><process version="9.0.001">
  <context>
    <input/>
    <output/>
    <macros/>
  </context>
  <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="9.0.001" expanded="true" height="68" name="Retrieve 12_Feature_12.5_bos_hous_labeled" width="90" x="45" y="85">
        <parameter key="repository_entry" value="12_Feature_12.5_bos_hous_labeled"/>
      </operator>
      <operator activated="true" class="optimize_selection_backward" compatibility="9.0.001" expanded="true" height="103" name="Backward Elimination" width="90" x="246" y="34">
        <parameter key="stopping_behavior" value="with decrease of more than"/>
        <parameter key="maximal_relative_decrease" value="0.05"/>
        <process expanded="true">
          <operator activated="true" class="set_role" compatibility="9.0.001" expanded="true" height="82" name="Set Role" width="90" x="112" y="34">
            <parameter key="attribute_name" value="MEDV"/>
            <parameter key="target_role" value="label"/>
            <list key="set_additional_roles">
              <parameter key="MEDV" value="label"/>
            </list>
          </operator>
          <operator activated="true" class="split_validation" compatibility="9.0.001" expanded="true" height="124" name="Validation" width="90" x="246" y="34">
            <parameter key="sampling_type" value="shuffled sampling"/>
            <process expanded="true">
              <operator activated="true" class="linear_regression" compatibility="9.0.001" expanded="true" height="103" name="Linear Regression" width="90" x="179" y="34">
                <parameter key="feature_selection" value="none"/>
              </operator>
              <connect from_port="training" to_op="Linear Regression" to_port="training set"/>
              <connect from_op="Linear Regression" from_port="model" to_port="model"/>
              <connect from_op="Linear Regression" from_port="weights" to_port="through 1"/>
              <portSpacing port="source_training" spacing="0"/>
              <portSpacing port="sink_model" spacing="0"/>
              <portSpacing port="sink_through 1" spacing="0"/>
              <portSpacing port="sink_through 2" spacing="0"/>
            </process>
            <process expanded="true">
              <operator activated="true" class="apply_model" compatibility="7.1.001" expanded="true" height="82" name="Apply Model" width="90" x="45" y="30">
                <list key="application_parameters"/>
              </operator>
              <operator activated="true" class="performance_regression" compatibility="9.0.001" expanded="true" height="82" name="Performance" width="90" x="112" y="165">
                <parameter key="main_criterion" value="correlation"/>
                <parameter key="absolute_error" value="true"/>
                <parameter key="squared_correlation" value="true"/>
              </operator>
              <connect from_port="model" to_op="Apply Model" to_port="model"/>
              <connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
              <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
              <connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
              <portSpacing port="source_model" spacing="0"/>
              <portSpacing port="source_test set" spacing="0"/>
              <portSpacing port="source_through 1" spacing="0"/>
              <portSpacing port="source_through 2" spacing="0"/>
              <portSpacing port="sink_averagable 1" spacing="0"/>
              <portSpacing port="sink_averagable 2" spacing="0"/>
            </process>
          </operator>
          <connect from_port="example set" to_op="Set Role" to_port="example set input"/>
          <connect from_op="Set Role" from_port="example set output" to_op="Validation" to_port="training"/>
          <connect from_op="Validation" from_port="averagable 1" to_port="performance"/>
          <portSpacing port="source_example set" spacing="0"/>
          <portSpacing port="sink_performance" spacing="0"/>
        </process>
      </operator>
      <operator activated="true" class="linear_regression" compatibility="9.0.001" expanded="true" height="103" name="Linear Regression (2)" width="90" x="447" y="187">
        <parameter key="feature_selection" value="greedy"/>
      </operator>
      <connect from_op="Retrieve 12_Feature_12.5_bos_hous_labeled" from_port="output" to_op="Backward Elimination" to_port="example set"/>
      <connect from_op="Backward Elimination" from_port="example set" to_op="Linear Regression (2)" to_port="training set"/>
      <connect from_op="Backward Elimination" from_port="attribute weights" to_port="result 2"/>
      <connect from_op="Backward Elimination" from_port="performance" to_port="result 3"/>
      <connect from_op="Linear Regression (2)" from_port="model" 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"/>
      <portSpacing port="sink_result 3" spacing="0"/>
      <portSpacing port="sink_result 4" spacing="0"/>
      <description align="center" color="yellow" colored="false" height="105" resized="false" width="180" x="89" y="261">Final setup of the backward elimination wrapper process.</description>
    </process>
  </operator>
</process>

Best Answer

  • lionelderkrikorlionelderkrikor RapidMiner Certified Analyst, Member Posts: 1,195 Unicorn
    Solution Accepted

    Hi @Maerkli,

     

    With the Set Role operator outside the nested operator Backward Elimination (just after the Read CSV opearator),

    it works : 

    <?xml version="1.0" encoding="UTF-8"?><process version="9.0.001">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="6.0.002" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="read_csv" compatibility="9.0.001" expanded="true" height="68" name="Read CSV" width="90" x="112" y="34">
    <parameter key="csv_file" value="C:\Users\Lionel\Downloads\12_Feature_12.5_bos_hous_labeled.csv"/>
    <parameter key="skip_comments" value="true"/>
    <parameter key="date_format" value="MMM d, yyyy h:mm:ss a z"/>
    <list key="annotations"/>
    <parameter key="encoding" value="windows-1252"/>
    <list key="data_set_meta_data_information">
    <parameter key="0" value="CRIM.true.real.attribute"/>
    <parameter key="1" value="ZN.true.real.attribute"/>
    <parameter key="2" value="INDUS.true.real.attribute"/>
    <parameter key="3" value="CHAS.true.real.attribute"/>
    <parameter key="4" value="NOX.true.real.attribute"/>
    <parameter key="5" value="RM.true.real.attribute"/>
    <parameter key="6" value="AGE.true.real.attribute"/>
    <parameter key="7" value="DIS.true.real.attribute"/>
    <parameter key="8" value="RAD.true.real.attribute"/>
    <parameter key="9" value="TAX.true.real.attribute"/>
    <parameter key="10" value="PTRATIO.true.real.attribute"/>
    <parameter key="11" value="B.true.real.attribute"/>
    <parameter key="12" value="LSTAT.true.real.attribute"/>
    <parameter key="13" value="MEDV.true.real.attribute"/>
    </list>
    <parameter key="read_not_matching_values_as_missings" value="false"/>
    </operator>
    <operator activated="true" class="set_role" compatibility="9.0.001" expanded="true" height="82" name="Set Role (2)" width="90" x="246" y="34">
    <parameter key="attribute_name" value="MEDV"/>
    <parameter key="target_role" value="label"/>
    <list key="set_additional_roles"/>
    </operator>
    <operator activated="true" class="optimize_selection_backward" compatibility="9.0.001" expanded="true" height="103" name="Backward Elimination" width="90" x="380" y="34">
    <parameter key="stopping_behavior" value="with decrease of more than"/>
    <parameter key="maximal_relative_decrease" value="0.05"/>
    <process expanded="true">
    <operator activated="true" class="set_role" compatibility="9.0.001" expanded="true" height="82" name="Set Role" width="90" x="112" y="34">
    <parameter key="attribute_name" value="MEDV"/>
    <parameter key="target_role" value="label"/>
    <list key="set_additional_roles">
    <parameter key="MEDV" value="label"/>
    </list>
    </operator>
    <operator activated="true" class="split_validation" compatibility="9.0.001" expanded="true" height="124" name="Validation" width="90" x="246" y="34">
    <parameter key="sampling_type" value="shuffled sampling"/>
    <process expanded="true">
    <operator activated="true" class="linear_regression" compatibility="9.0.001" expanded="true" height="103" name="Linear Regression" width="90" x="179" y="34">
    <parameter key="feature_selection" value="none"/>
    </operator>
    <connect from_port="training" to_op="Linear Regression" to_port="training set"/>
    <connect from_op="Linear Regression" from_port="model" to_port="model"/>
    <connect from_op="Linear Regression" from_port="weights" to_port="through 1"/>
    <portSpacing port="source_training" spacing="0"/>
    <portSpacing port="sink_model" spacing="0"/>
    <portSpacing port="sink_through 1" spacing="0"/>
    <portSpacing port="sink_through 2" spacing="0"/>
    </process>
    <process expanded="true">
    <operator activated="true" class="apply_model" compatibility="7.1.001" expanded="true" height="82" name="Apply Model" width="90" x="45" y="30">
    <list key="application_parameters"/>
    </operator>
    <operator activated="true" class="performance_regression" compatibility="9.0.001" expanded="true" height="82" name="Performance" width="90" x="112" y="165">
    <parameter key="main_criterion" value="correlation"/>
    <parameter key="absolute_error" value="true"/>
    <parameter key="squared_correlation" value="true"/>
    </operator>
    <connect from_port="model" to_op="Apply Model" to_port="model"/>
    <connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
    <connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
    <connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
    <portSpacing port="source_model" spacing="0"/>
    <portSpacing port="source_test set" spacing="0"/>
    <portSpacing port="source_through 1" spacing="0"/>
    <portSpacing port="source_through 2" spacing="0"/>
    <portSpacing port="sink_averagable 1" spacing="0"/>
    <portSpacing port="sink_averagable 2" spacing="0"/>
    </process>
    </operator>
    <connect from_port="example set" to_op="Set Role" to_port="example set input"/>
    <connect from_op="Set Role" from_port="example set output" to_op="Validation" to_port="training"/>
    <connect from_op="Validation" from_port="averagable 1" to_port="performance"/>
    <portSpacing port="source_example set" spacing="0"/>
    <portSpacing port="sink_performance" spacing="0"/>
    </process>
    </operator>
    <operator activated="true" class="linear_regression" compatibility="9.0.001" expanded="true" height="103" name="Linear Regression (2)" width="90" x="514" y="187">
    <parameter key="feature_selection" value="greedy"/>
    </operator>
    <connect from_op="Read CSV" from_port="output" to_op="Set Role (2)" to_port="example set input"/>
    <connect from_op="Set Role (2)" from_port="example set output" to_op="Backward Elimination" to_port="example set"/>
    <connect from_op="Backward Elimination" from_port="example set" to_op="Linear Regression (2)" to_port="training set"/>
    <connect from_op="Backward Elimination" from_port="attribute weights" to_port="result 2"/>
    <connect from_op="Backward Elimination" from_port="performance" to_port="result 3"/>
    <connect from_op="Linear Regression (2)" from_port="model" 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"/>
    <portSpacing port="sink_result 3" spacing="0"/>
    <portSpacing port="sink_result 4" spacing="0"/>
    <description align="center" color="yellow" colored="false" height="105" resized="false" width="180" x="89" y="261">Final setup of the backward elimination wrapper process.</description>
    </process>
    </operator>
    </process>

    I hope it helps,

     

    Regards,

     

    Lionel

     

    NB : According to your dataset, I see you are studying RapidMiner with the book "Predictive Analytics and Data Mining : Concept and Practice with RapidMiner" :  good continuation...:smileyhappy:

     

     

     

Answers

  • MaerkliMaerkli Member Posts: 84 Guru

    Hallo Lionel,

     

    1) Your correction is fine.

    2) Correct for the book. It is excellent; I really appreciate the (mathematical) formalism used to explain the concepts of datamining.

    Bedankt.

    Maerkli.

     

     

Sign In or Register to comment.