Date to Nominal Function
rowan_g
New Altair Community Member
Hi,
Not sure if this has been requested. A Date-to-Nominal function for use in the Generate Attributes operator would be awesome!
Thanks for all the great work! Rapidminer is a fine piece of software! Keep it up1
Not sure if this has been requested. A Date-to-Nominal function for use in the Generate Attributes operator would be awesome!
Thanks for all the great work! Rapidminer is a fine piece of software! Keep it up1
Tagged:
0
Answers
-
Hi,
there are already multiple possibilities to accomplish this.
Best,
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<process version="5.3.009">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.009" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="generate_data_user_specification" compatibility="5.3.009" expanded="true" height="60" name="Generate Data by User Specification" width="90" x="112" y="30">
<list key="attribute_values">
<parameter key="nominal_date" value=""2007-08-09 12:37:56""/>
</list>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="generate_attributes" compatibility="5.3.009" expanded="true" height="76" name="Generate Attributes (2)" width="90" x="246" y="30">
<list key="function_descriptions">
<parameter key="nominal_to_data_old" value="nominal_date"/>
</list>
</operator>
<operator activated="true" class="nominal_to_date" compatibility="5.3.009" expanded="true" height="76" name="Nominal to Date" width="90" x="380" y="30">
<parameter key="attribute_name" value="nominal_date"/>
<parameter key="date_type" value="date_time"/>
<parameter key="date_format" value="yyyy-MM-dd HH:mm:ss"/>
</operator>
<operator activated="true" class="generate_data_user_specification" compatibility="5.3.009" expanded="true" height="60" name="Generate Data by User Specification (2)" width="90" x="112" y="165">
<list key="attribute_values">
<parameter key="nominal_date" value=""2007-08-09 12:37:56""/>
</list>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="generate_attributes" compatibility="5.3.009" expanded="true" height="76" name="Generate Attributes" width="90" x="246" y="165">
<list key="function_descriptions">
<parameter key="date" value="date_parse_custom(nominal_date, "yyyy-MM-dd HH:mm:ss", "de")"/>
</list>
</operator>
<connect from_op="Generate Data by User Specification" from_port="output" to_op="Generate Attributes (2)" to_port="example set input"/>
<connect from_op="Generate Attributes (2)" from_port="example set output" to_op="Nominal to Date" to_port="example set input"/>
<connect from_op="Nominal to Date" from_port="example set output" to_port="result 1"/>
<connect from_op="Generate Data by User Specification (2)" 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 2"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="18"/>
<portSpacing port="sink_result 2" spacing="90"/>
<portSpacing port="sink_result 3" spacing="0"/>
</process>
</operator>
</process>
Nils0 -
Sorry - didn't realise date parse custom was the operator to use.
Thanks!0