Pages: [1]
Author Topic: [SOLVED] Converting Numerical to Nominal data types, with content replaced  (Read 1561 times)
Posts: 7

« on: September 18, 2013, 07:27:39 PM »

Hello All,
I'm new to RapidMiner and while I was experimenting with it, I was not sure of how to do the following process....

I'm making use of Golf Data in Samples provided.
I want to convert the temperature & humidity to nominal form i.e.,
temp <=75 => cool
temmp > 75 and temp <= 85 => medium
temp > 85 hot
similarly with humidity.
i tried to use the numerical to nominal option, but it doesn't seem to work that way.
Is there an option to use?
Thanks in advance.
« Last Edit: September 21, 2013, 06:27:13 PM by transformers123 » Logged
Marco Boeck
Hero Member
Posts: 1450

« Reply #1 on: September 20, 2013, 08:58:09 AM »


you can use the "Generate Attributes" operator for that. Because you are changing a numerical attribute to a nominal one, you cannot overwrite the same attribute, so you have to create a new one. The old one could be removed via "Select Attributes". See the following example process:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.013">
  <operator activated="true" class="process" compatibility="5.3.013" expanded="true" name="Process">
    <process expanded="true">
      <operator activated="true" class="retrieve" compatibility="5.3.013" expanded="true" height="60" name="Retrieve Golf" width="90" x="45" y="30">
        <parameter key="repository_entry" value="//Samples/data/Golf"/>
      <operator activated="true" class="generate_attributes" compatibility="5.3.013" expanded="true" height="76" name="Generate Attributes" width="90" x="179" y="30">
        <list key="function_descriptions">
          <parameter key="Temperature_Nominal" value="if (Temperature&lt;=75, &quot;cool&quot;, if (Temperature&gt;=85, &quot;hot&quot;, &quot;medium&quot;))"/>
      <connect from_op="Retrieve Golf" from_port="output" to_op="Generate Attributes" to_port="example set input"/>
      <connect from_op="Generate Attributes" 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"/>


Are you from a scientific background and want to use professional features of RapidMiner Studio 7? Check out our RapidMiner Academia program!

Looking for more information? Check out our docs page here:
Posts: 7

« Reply #2 on: September 21, 2013, 03:54:26 AM »

Cool... That Helped.
Thanks  Smiley
Pages: [1]
Jump to: