🎉 🎉. RAPIDMINER 9.8 IS OUT!!! 🎉 🎉

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

CLICK HERE TO DOWNLOAD

discrete attribute that indicates the age

heheehehee Member Posts: 4 Newbie
Hello!

My query is ..
How can I get to the following:

"Generate a new discrete attribute that indicates the age of the
people as of August 8, 1934 "

The above, taking into account that:

DOB are represented in the table as:

August 18, 1990

Help pls

Answers

  • VanlalVanlal Member Posts: 11 Contributor II
    Hi

    <div>&lt;?xml version="1.0" encoding="UTF-8"?&gt;&lt;process version="9.6.000"&gt;</div><div>&nbsp; &lt;context&gt;</div><div>&nbsp; &nbsp; &lt;input/&gt;</div><div>&nbsp; &nbsp; &lt;output/&gt;</div><div>&nbsp; &nbsp; &lt;macros/&gt;</div><div>&nbsp; &lt;/context&gt;</div><div>&nbsp; &lt;operator activated="true" class="process" compatibility="9.4.000" expanded="true" name="Process" origin="GENERATED_TUTORIAL"&gt;</div><div>&nbsp; &nbsp; &lt;parameter key="logverbosity" value="init"/&gt;</div><div>&nbsp; &nbsp; &lt;parameter key="random_seed" value="2001"/&gt;</div><div>&nbsp; &nbsp; &lt;parameter key="send_mail" value="never"/&gt;</div><div>&nbsp; &nbsp; &lt;parameter key="notification_email" value=""/&gt;</div><div>&nbsp; &nbsp; &lt;parameter key="process_duration_for_mail" value="30"/&gt;</div><div>&nbsp; &nbsp; &lt;parameter key="encoding" value="SYSTEM"/&gt;</div><div>&nbsp; &nbsp; &lt;process expanded="true"&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;operator activated="true" class="retrieve" compatibility="9.6.000" expanded="true" height="68" name="Retrieve Age" width="90" x="45" y="136"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;parameter key="repository_entry" value="../data/Age"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;/operator&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;operator activated="true" class="generate_attributes" compatibility="9.6.000" expanded="true" height="82" name="Generate Attributes (2)" width="90" x="179" y="136"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;list key="function_descriptions"&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &lt;parameter key="DiscreteAgeDividedbyDay" value="date_diff(date_parse(&amp;quot;8/8/1934&amp;quot;),DOB)/8.64e+7/365"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;/list&gt;</div><div>&nbsp; &nbsp; &nbsp; &nbsp; &lt;parameter key="keep_all" value="true"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;/operator&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;connect from_op="Retrieve Age" from_port="output" to_op="Generate Attributes (2)" to_port="example set input"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;connect from_op="Generate Attributes (2)" from_port="example set output" to_port="result 1"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;portSpacing port="source_input 1" spacing="0"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;portSpacing port="sink_result 1" spacing="0"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;portSpacing port="sink_result 2" spacing="0"/&gt;</div><div>&nbsp; &nbsp; &nbsp; &lt;background height="232" location="//Samples/Tutorials/Data Handling/05/tutorial5" width="1502" x="26" y="47"/&gt;</div><div>&nbsp; &nbsp; &lt;/process&gt;</div><div>&nbsp; &lt;/operator&gt;</div><div>&lt;/process&gt;</div>

    The sample data i used is 
    Name DOB
    Albert 11/8/1990
    John 11/4/1991
    Carin 12/3/1992
    Hulk 9/4/1992


Sign In or Register to comment.