Pages: [1]
  Print  
Author Topic: Replace Missing Values  (Read 361 times)
jaysonpryde
Newbie
*
Posts: 20


« on: February 07, 2012, 10:11:35 AM »

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!  Smiley
Logged
jaysonpryde
Newbie
*
Posts: 20


« Reply #1 on: February 07, 2012, 11:24:00 AM »

Any help is greatly appreciated...
Logged
haddock
Hero Member
*****
Posts: 759



WWW
« Reply #2 on: February 07, 2012, 02:06:30 PM »

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.
Logged

Where is the wisdom we have lost in knowledge?
Where is the knowledge we have lost in information?

T.S.Eliot ~ Choruses from the Rock 1934
Nils
Administrator
Full Member
*****
Posts: 108


« Reply #3 on: February 07, 2012, 04:28:10 PM »

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
Logged

Please add [SOLVED] to the topic title when your problem has been solved! (do so by editing the first post in the thread and modifying the title)
jaysonpryde
Newbie
*
Posts: 20


« Reply #4 on: February 08, 2012, 01:13:45 AM »

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?
Logged
jaysonpryde
Newbie
*
Posts: 20


« Reply #5 on: February 09, 2012, 05:42:51 AM »

Any more inputs? Both "Replace Values" and "Replace Missing Values" are not working.
Thanks!
Logged
Nils
Administrator
Full Member
*****
Posts: 108


« Reply #6 on: February 09, 2012, 09:30:41 AM »

Apart from the invalid learning and testing this process works with the current SVN version:

Code:
<?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
Code:
svn co https://rapidminer.svn.sourceforge.net/svnroot/rapidminer rapidminer
There the fix for the problem should already be included.

Greetings Nils
Logged

Please add [SOLVED] to the topic title when your problem has been solved! (do so by editing the first post in the thread and modifying the title)
Pages: [1]
  Print  
 
Jump to: