Replace Missing Value Failure with nominal null values

Ina_KIna_K Member Posts: 9 Contributor II
edited November 2018 in Help

Hi all,


my example set looks just like this:



I need to replace the nominal null values or missing nominal values by 'N' but it doesn't work after almost all variations of regular expressions... I don't get any errors. It just doesn't work.

The code:

<operator activated="true" breakpoints="after" class="replace" compatibility="7.2.001" expanded="true" height="82" name="Replace '?'" width="90" x="581" y="85">
<parameter key="replace_what" value="\?"/>
<parameter key="replace_by" value="N"/>


Can someone help?


Kind regards


Best Answers

  • Options
    Telcontar120Telcontar120 Moderator, RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn
    Solution Accepted

    Your xml is incomplete, so I am not able to determine exactly what is happening, but you have at least two options:

    • if the "?" shown are truly missing values (according to RapidMiner, check the statistics tab to see) then the "Replace Missing Values" operator should easily do the trick
    • if the "?" are not really missing, but just nominal values signifying missing, then the more general "Replace" operator will also do what you want, but you will need to escape the "?" with backslash in your regex (and the regex builder will show you whether you have done it correctly by testing in the "text" box and then checking the "results preview"

    I just tested the generic Replace operator and it has no problems handling the replacement of a question mark.





    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
  • Options
    Ina_KIna_K Member Posts: 9 Contributor II
    Solution Accepted

    Thanks for your advice.

    I tried the solution with Replace Missing Values (one more time, after 1000 times before) and set the parameter default to value and parameter replenishment value to 'N' (=No).


    My previous attempts were using zero as parameter value for default, which didn't work. I assume this attempt failed because the attributes where of nominal type. Since zero is numerical - it doesn't work?


    Thank you!




Sign In or Register to comment.