Due to recent updates, all users are required to create an Altair One account to login to the RapidMiner community. Click the Register button to create your account using the same email that you have previously used to login to the RapidMiner community. This will ensure that any previously created content will be synced to your Altair One account. Once you login, you will be asked to provide a username that identifies you to other Community users. Email us at Community with questions.

Discretization Problems [Solved]

sukottosukotto Member Posts: 3 Contributor I
edited November 2018 in Help
Ok, so I thought I got past getting stuck using discretization, as I have used it many times, but i am stuck. I have looked at my prior processes and the samples and I am not sure what I am doing wrong. It will not discretize...

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.0">
 <context>
   <input/>
   <output/>
   <macros/>
 </context>
 <operator activated="true" class="process" expanded="true" name="Process">
   <process expanded="true" height="386" width="660">
     <operator activated="true" class="read_access" expanded="true" height="60" name="Read Access" width="90" x="45" y="30">
       <parameter key="database_file" value="C:\Users\Scott\Documents\My Dropbox\IT-Catalyst\other\oilily\oililyMktwks\oilily.mdb"/>
       <parameter key="table_name" value="TestingData"/>
     </operator>
     <operator activated="true" class="set_role" expanded="true" height="76" name="Set Role" width="90" x="179" y="30">
       <parameter key="name" value="customer_id"/>
       <parameter key="target_role" value="id"/>
     </operator>
     <operator activated="true" class="set_role" expanded="true" height="76" name="Set Role (2)" width="90" x="293" y="72">
       <parameter key="name" value="isRecent"/>
       <parameter key="target_role" value="label"/>
     </operator>
     <operator activated="true" class="select_attributes" expanded="true" height="76" name="Select Attributes" width="90" x="439" y="45">
       <parameter key="attribute_filter_type" value="subset"/>
       <parameter key="attributes" value="VI/MC|Cash|C_99|C_95|C_91|C_90|C_9|C_89|C_80|C_8|C_70|C_61|C_60|C_55|C_54|C_53|C_52|C_41|C_40|C_39|C_31|C_30|C_29|C_28|C_21|C_20|C_2|C_19|C_18|C_11|C_10|C_1|Amex|create_source|customer_id|households|hwIDR|hwc|isRecent|medianInc|multistore|population|post_code|sales_associate_no|store_no|ttlSales|ttlTxn"/>
       <parameter key="include_special_attributes" value="true"/>
     </operator>
     <operator activated="true" class="numerical_to_real" expanded="true" height="76" name="Numerical to Real" width="90" x="463" y="117">
       <parameter key="attribute_filter_type" value="subset"/>
       <parameter key="attributes" value="ttlSales"/>
     </operator>
     <operator activated="true" class="discretize_by_user_specification" expanded="true" height="94" name="Discretize" width="90" x="514" y="165">
       <parameter key="attribute_filter_type" value="single"/>
       <parameter key="attribute" value="ttlSales"/>
       <parameter key="attributes" value="ttlSales"/>
       <list key="classes">
         <parameter key="first" value="1000.0"/>
         <parameter key="second" value="2000.0"/>
         <parameter key="third" value="3000.0"/>
         <parameter key="fourth" value="4000.0"/>
         <parameter key="fifth" value="5000.0"/>
         <parameter key="over5k" value="1000000.0"/>
       </list>
     </operator>
     <connect from_op="Read Access" from_port="output" to_op="Set Role" to_port="example set input"/>
     <connect from_op="Set Role" from_port="example set output" to_op="Set Role (2)" to_port="example set input"/>
     <connect from_op="Set Role (2)" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
     <connect from_op="Select Attributes" from_port="example set output" to_op="Numerical to Real" to_port="example set input"/>
     <connect from_op="Numerical to Real" from_port="example set output" to_op="Discretize" to_port="example set input"/>
     <portSpacing port="source_input 1" spacing="0"/>
     <portSpacing port="sink_result 1" spacing="0"/>
   </process>
 </operator>
</process>

Answers

  • SebastianLohSebastianLoh Member Posts: 99 Contributor II
    Hi sukotto,

    did you just forget to connect the Discretize operator to a result output?

    I remodel you process with other data and it works (btw, you do not need the numerical to real operator):
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.0">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" expanded="true" name="Process">
        <process expanded="true" height="406" width="567">
          <operator activated="false" class="read_access" expanded="true" height="60" name="Read Access" width="90" x="45" y="30">
            <parameter key="database_file" value="C:\Users\Scott\Documents\My Dropbox\IT-Catalyst\other\oilily\oililyMktwks\oilily.mdb"/>
          </operator>
          <operator activated="true" class="retrieve" expanded="true" height="60" name="Retrieve (2)" width="90" x="45" y="300">
            <parameter key="repository_entry" value="//Samples/data/Sonar"/>
          </operator>
          <operator activated="true" class="rename" expanded="true" height="76" name="Rename" width="90" x="179" y="300">
            <parameter key="old_name" value="attribute_1"/>
            <parameter key="new_name" value="ttlSales"/>
          </operator>
          <operator activated="false" class="set_role" expanded="true" height="76" name="Set Role" width="90" x="313" y="30">
            <parameter key="name" value="customer_id"/>
            <parameter key="target_role" value="id"/>
          </operator>
          <operator activated="false" class="set_role" expanded="true" height="76" name="Set Role (2)" width="90" x="447" y="30">
            <parameter key="name" value="isRecent"/>
            <parameter key="target_role" value="label"/>
          </operator>
          <operator activated="false" class="select_attributes" expanded="true" height="76" name="Select Attributes" width="90" x="45" y="165">
            <parameter key="attribute_filter_type" value="subset"/>
            <parameter key="attributes" value="VI/MC|Cash|C_99|C_95|C_91|C_90|C_9|C_89|C_80|C_8|C_70|C_61|C_60|C_55|C_54|C_53|C_52|C_41|C_40|C_39|C_31|C_30|C_29|C_28|C_21|C_20|C_2|C_19|C_18|C_11|C_10|C_1|Amex|create_source|customer_id|households|hwIDR|hwc|isRecent|medianInc|multistore|population|post_code|sales_associate_no|store_no|ttlSales|ttlTxn"/>
            <parameter key="include_special_attributes" value="true"/>
          </operator>
          <operator activated="true" class="numerical_to_real" expanded="true" height="76" name="Numerical to Real" width="90" x="313" y="210">
            <parameter key="attribute_filter_type" value="subset"/>
            <parameter key="attributes" value="ttlSales"/>
          </operator>
          <operator activated="true" class="discretize_by_user_specification" expanded="true" height="94" name="Discretize" width="90" x="447" y="210">
            <parameter key="attribute_filter_type" value="single"/>
            <parameter key="attribute" value="ttlSales"/>
            <parameter key="attributes" value="ttlSales"/>
            <list key="classes">
              <parameter key="first" value="1000.0"/>
              <parameter key="second" value="2000.0"/>
              <parameter key="third" value="3000.0"/>
              <parameter key="fourth" value="4000.0"/>
              <parameter key="fifth" value="5000.0"/>
              <parameter key="over5k" value="1000000.0"/>
            </list>
          </operator>
          <connect from_op="Read Access" from_port="output" to_op="Set Role" to_port="example set input"/>
          <connect from_op="Retrieve (2)" from_port="output" to_op="Rename" to_port="example set input"/>
          <connect from_op="Rename" from_port="example set output" to_op="Numerical to Real" to_port="example set input"/>
          <connect from_op="Set Role" from_port="example set output" to_op="Set Role (2)" to_port="example set input"/>
          <connect from_op="Set Role (2)" from_port="example set output" to_op="Select Attributes" to_port="example set input"/>
          <connect from_op="Numerical to Real" from_port="example set output" to_op="Discretize" to_port="example set input"/>
          <connect from_op="Discretize" from_port="example set output" 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>
    Ciao Sebastian
  • sukottosukotto Member Posts: 3 Contributor I
    Why, yes I did forget.... :-[
    Thanks a ton!!!
Sign In or Register to comment.