Do Not Use Certain Attributes in Prediction
Hi, I have attributes that are useful as information in a training and scored example set, but I do not want them to be used in my learning model. How do I set an attribute so it comes along for the ride as training or scored data in the examples, but is not used for learning? I don't see a target role that allows data to be consumed like a "comment" or such.
thanks
Find more posts tagged with
Sort by:
1 - 3 of
31
The Set Role operator isn't just limited to the listed options. You can type whatever you like in there & make the field special.
Here's an example.
<?xml version="1.0" encoding="UTF-8"?><process version="7.6.001">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.6.001" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="7.6.001" expanded="true" height="68" name="Retrieve Golf" width="90" x="179" y="136">
<parameter key="repository_entry" value="//Samples/data/Golf"/>
</operator>
<operator activated="true" class="set_role" compatibility="7.6.001" expanded="true" height="82" name="Set Role" width="90" x="380" y="136">
<parameter key="attribute_name" value="Outlook"/>
<parameter key="target_role" value="comment1"/>
<list key="set_additional_roles">
<parameter key="Humidity" value="comment2"/>
</list>
<description align="center" color="transparent" colored="false" width="126">Set Roles of Outlook &amp; Humidity as special</description>
</operator>
<operator activated="true" class="multiply" compatibility="7.6.001" expanded="true" height="103" name="Multiply" width="90" x="514" y="161"/>
<operator activated="true" class="concurrency:loop_attributes" compatibility="7.6.001" expanded="true" height="82" name="Loop Attributes" width="90" x="648" y="238">
<parameter key="attribute_filter_type" value="subset"/>
<parameter key="attributes" value="Outlook|Humidity"/>
<parameter key="include_special_attributes" value="true"/>
<parameter key="reuse_results" value="true"/>
<process expanded="true">
<operator activated="true" class="set_role" compatibility="7.6.001" expanded="true" height="82" name="Return Role" width="90" x="179" y="136">
<parameter key="attribute_name" value="%{loop_attribute}"/>
<list key="set_additional_roles"/>
</operator>
<connect from_port="input 1" to_op="Return Role" to_port="example set input"/>
<connect from_op="Return Role" from_port="example set output" to_port="output 1"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="source_input 2" spacing="0"/>
<portSpacing port="sink_output 1" spacing="0"/>
<portSpacing port="sink_output 2" spacing="0"/>
</process>
<description align="center" color="transparent" colored="false" width="126">Return Outlook &amp; Humidity to normal.</description>
</operator>
<connect from_op="Retrieve Golf" from_port="output" to_op="Set Role" to_port="example set input"/>
<connect from_op="Set Role" from_port="example set output" to_op="Multiply" to_port="input"/>
<connect from_op="Multiply" from_port="output 1" to_port="result 1"/>
<connect from_op="Multiply" from_port="output 2" to_op="Loop Attributes" to_port="input 1"/>
<connect from_op="Loop Attributes" from_port="output 1" to_port="result 2"/>
<portSpacing port="source_input 1" spacing="0"/>
<portSpacing port="sink_result 1" spacing="0"/>
<portSpacing port="sink_result 2" spacing="0"/>
<portSpacing port="sink_result 3" spacing="0"/>
</process>
</operator>
</process>
@JEdward 's proposed solution is far more elegant than mine and is the way to go in this kind of situations.
You would most likely need to split your data set prior to training and then join it back together afterwards, like this: