The Altair Community is migrating to a new platform to provide a better experience for you. The RapidMiner Community will merge with the Altair Community at the same time. In preparation for the migration, both communities are on read-only mode from July 15th - July 24th, 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.
Options

Replace Missing Values

jaysonprydejaysonpryde Member Posts: 20 Contributor II
edited November 2018 in Help
Hi,
    I'll just ask on how to use the "Replace Missing Values" operator. After the Apply Model operator, I am dropping some predictions using "Drop Uncertain Predictions" leading to a "?" value on the prediction(class) attribute.
  What I want to do is change this "?" to a different string. What I've done so far, which unfortunately is not working is the ff:

    1. Use Replace Missing Values operator
    2. Set the attribute filter type to "single"
    3. On the attribute field, I inputted "prediction(class)"
    4. I ticked the "include special attributes" check box
    5. On the default field, i selected "none". I also tried "zero" and "value". But none of them work as I expected
    6. Edit the columns field and place prediction(calss) and value on the "attribute" and "replace with fields", respectively.
    7. Under replinishment value, i placed there the string that will changed the "?" value. (e.g. "vague")

How should I do this? Your ideas are greatly appreciated.
Thank you!  :)

Answers

  • Options
    jaysonprydejaysonpryde Member Posts: 20 Contributor II
    Any help is greatly appreciated...
  • Options
    haddockhaddock Member Posts: 849 Maven
    Hi there,

    Apparently this bug was fixed... see here http://rapid-i.com/rapidforum/index.php/topic,4653.msg16823.html#msg16823

    But it still appears on my 5.2.

    At least it is in hand.
  • Options
    Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    Hi,

    according to the post by Marco he has fixed the bug shortly  after the release of 5.2. Thus it is not yet contained in the current 5.2 release but  it should be fixed with the next bugfix release.

    Best,
    Nils
  • Options
    jaysonprydejaysonpryde Member Posts: 20 Contributor II
    Given what you mentioned, yeah, i think the fix was not included.
    But is this the root cause? I mean, based on my explanation/step by step description, haven't I committed some errors?
  • Options
    jaysonprydejaysonpryde Member Posts: 20 Contributor II
    Any more inputs? Both "Replace Values" and "Replace Missing Values" are not working.
    Thanks!
  • Options
    Nils_WoehlerNils_Woehler Member Posts: 463 Maven
    Apart from the invalid learning and testing this process works with the current SVN version:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <process version="5.2.001">
      <context>
        <input/>
        <output/>
        <macros/>
      </context>
      <operator activated="true" class="process" compatibility="5.2.001" expanded="true" name="Process">
        <process expanded="true" height="606" width="705">
          <operator activated="true" class="retrieve" compatibility="5.2.001" expanded="true" height="60" name="Retrieve" width="90" x="45" y="30">
            <parameter key="repository_entry" value="//Samples/data/Iris"/>
          </operator>
          <operator activated="true" class="k_nn" compatibility="5.2.001" expanded="true" height="76" name="k-NN" width="90" x="180" y="30">
            <parameter key="k" value="10"/>
          </operator>
          <operator activated="true" class="apply_model" compatibility="5.2.001" expanded="true" height="76" name="Apply Model" width="90" x="315" y="30">
            <list key="application_parameters"/>
          </operator>
          <operator activated="true" class="drop_uncertain_predictions" compatibility="5.2.001" expanded="true" height="76" name="Drop Uncertain Predictions" width="90" x="450" y="30">
            <parameter key="min_confidence" value="0.9"/>
            <list key="min_confidences"/>
          </operator>
          <operator activated="true" class="replace_missing_values" compatibility="5.2.001" expanded="true" height="94" name="Replace Missing Values" width="90" x="581" y="30">
            <parameter key="attribute_filter_type" value="single"/>
            <parameter key="attribute" value="prediction(label)"/>
            <parameter key="include_special_attributes" value="true"/>
            <parameter key="default" value="value"/>
            <list key="columns"/>
            <parameter key="replenishment_value" value="none"/>
          </operator>
          <connect from_op="Retrieve" from_port="output" to_op="k-NN" to_port="training set"/>
          <connect from_op="k-NN" from_port="model" to_op="Apply Model" to_port="model"/>
          <connect from_op="k-NN" from_port="exampleSet" to_op="Apply Model" to_port="unlabelled data"/>
          <connect from_op="Apply Model" from_port="labelled data" to_op="Drop Uncertain Predictions" to_port="example set input"/>
          <connect from_op="Drop Uncertain Predictions" from_port="example set output" to_op="Replace Missing Values" to_port="example set input"/>
          <connect from_op="Replace Missing Values" 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>
    But as i have stated above you have to be a little more patient and wait until a bugfix release is released or you just can download the current svn release via
    svn co https://rapidminer.svn.sourceforge.net/svnroot/rapidminer rapidminer
    There the fix for the problem should already be included.

    Greetings Nils
Sign In or Register to comment.