๐ŸŽ‰ ๐ŸŽ‰. RAPIDMINER 9.8 IS OUT!!! ๐ŸŽ‰ ๐ŸŽ‰

RapidMiner 9.8 continues to innovate in data science collaboration, connectivity and governance

CLICK HERE TO DOWNLOAD

#NULL value is declared as one of the two values of a binominal attribute

agelos_katsantoagelos_katsanto Member Posts: 2 Contributor I
edited February 2020 in Help

Hello everyone,

I import my data and at the "Format your columns" step , on some binominal variables with values 0 or 1 there are missing values. These missing values are parsed as #NULL in this step and the attribute is declared as polynominal . When i try to change the attribute's type back to binominal , #NULL is one of the two values and the 0 or 1 is declared as a missing value noted with "?" .

How i can declare #NULL as missing value in binominal type attribute?

Thank you for your time

ย 

Tagged:

Answers

  • rfuentealbarfuentealba Moderator, RapidMiner Certified Analyst, Member, University Professor Posts: 532   Unicorn

    Hi @agelos_katsanto

    ย 

    Here is a process that does what you want:

    ย 

    <?xml version="1.0" encoding="UTF-8"?><process version="9.0.002">
    <context>
    <input/>
    <output/>
    <macros/>
    </context>
    <operator activated="true" class="process" compatibility="9.0.002" expanded="true" name="Process">
    <process expanded="true">
    <operator activated="true" class="read_csv" compatibility="9.0.002" expanded="true" height="68" name="Read CSV" width="90" x="112" y="34">
    <parameter key="csv_file" value="/Users/master/testing.csv"/>
    <parameter key="column_separators" value=","/>
    <parameter key="skip_comments" value="true"/>
    <parameter key="date_format" value="MMM d, yyyy h:mm:ss a z"/>
    <list key="annotations"/>
    <list key="data_set_meta_data_information">
    <parameter key="0" value="ID.true.integer.attribute"/>
    <parameter key="1" value="State.true.polynominal.attribute"/>
    </list>
    <parameter key="read_not_matching_values_as_missings" value="false"/>
    </operator>
    <operator activated="true" class="replace" compatibility="9.0.002" expanded="true" height="82" name="Replace" width="90" x="246" y="34">
    <parameter key="attribute_filter_type" value="single"/>
    <parameter key="attribute" value="State"/>
    <parameter key="replace_what" value="N"/>
    </operator>
    <operator activated="true" class="nominal_to_binominal" compatibility="9.0.002" expanded="true" height="103" name="Nominal to Binominal" width="90" x="380" y="34">
    <parameter key="attribute_filter_type" value="single"/>
    <parameter key="attribute" value="State"/>
    </operator>
    <connect from_op="Read CSV" from_port="output" to_op="Replace" to_port="example set input"/>
    <connect from_op="Replace" from_port="example set output" to_op="Nominal to Binominal" to_port="example set input"/>
    <connect from_op="Nominal to Binominal" 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>

    I basically read the file, assigning it a polynominal value. Replace the N (well, I was lazy) value by nothing, and then apply Nominal to Binominal.

    ย 

    You will have to change the route of the csv file attached on theย Read CSV operator to make things work for you.

    ย 

    Have a good day,

    ย 

  • agelos_katsantoagelos_katsanto Member Posts: 2 Contributor I

    Thank you for your time and effort.

    My dataset is in *.xls excel file .But this #NULL! value is unparsable from the "Read Excel" operator.ย 

    My problem is that when i import my dataset , the "automated" way of Rapidminer takes some of the initial numerical attributes as polynominal because it cant read #NULL! as missing value. And some of the initial binominal attributes as polynominal for the same reason. When i turn from polynominal to binominal it takes the 0 or 1 value as "?" and not the #NULL.

  • rfuentealbarfuentealba Moderator, RapidMiner Certified Analyst, Member, University Professor Posts: 532   Unicorn

    Hi @agelos_katsanto

    ย 

    What if you export these as text first, what does that appear? If you can send me the file (in a private message), I can get that to work for you and publish an appropriate answer.

    ย 

    All the best,

    ย 

    Rod.

Sign In or Register to comment.