input example set does not have a predicted label attribute
I'm trying to use "fit trend" and "Neural Net" tor find the trend line fot a time series.
Desipite using "Set Role" operator to set the attribute as lable, I still receive the error "input example set does not have a predicted label attribute" in latest version of Rapidminer studio:
Here is the project:
<?xml version="1.0" encoding="UTF-8"?><process version="7.4.000">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="7.4.000" expanded="true" name="Process">
<parameter key="logverbosity" value="init"/>
<parameter key="random_seed" value="2001"/>
<parameter key="send_mail" value="never"/>
<parameter key="notification_email" value=""/>
<parameter key="process_duration_for_mail" value="30"/>
<parameter key="encoding" value="SYSTEM"/>
<process expanded="true">
<operator activated="true" class="read_csv" compatibility="7.4.000" expanded="true" height="68" name="Read CSV" width="90" x="45" y="34">
<parameter key="csv_file" value="C:\Users\__\Desktop\Sample.csv"/>
<parameter key="column_separators" value=","/>
<parameter key="trim_lines" value="false"/>
<parameter key="use_quotes" value="true"/>
<parameter key="quotes_character" value="""/>
<parameter key="escape_character" value="\"/>
<parameter key="skip_comments" value="false"/>
<parameter key="comment_characters" value="#"/>
<parameter key="parse_numbers" value="true"/>
<parameter key="decimal_character" value="."/>
<parameter key="grouped_digits" value="false"/>
<parameter key="grouping_character" value=","/>
<parameter key="date_format" value=""/>
<parameter key="first_row_as_names" value="false"/>
<list key="annotations">
<parameter key="0" value="Name"/>
</list>
<parameter key="time_zone" value="SYSTEM"/>
<parameter key="locale" value="English (United States)"/>
<parameter key="encoding" value="windows-1252"/>
<list key="data_set_meta_data_information">
<parameter key="0" value="<Ticker>.true.polynominal.attribute"/>
<parameter key="1" value="<Per>.true.polynominal.attribute"/>
<parameter key="2" value="<DTYYYYMMDD>.true.integer.attribute"/>
<parameter key="3" value="<TIME>.true.integer.attribute"/>
<parameter key="4" value="<Open>.true.real.attribute"/>
<parameter key="5" value="<High>.true.real.attribute"/>
<parameter key="6" value="<Low>.true.real.attribute"/>
<parameter key="7" value="<Close>.true.real.label"/>
<parameter key="8" value="<Vol>.true.integer.attribute"/>
<parameter key="9" value="<Openint>.true.real.attribute"/>
</list>
<parameter key="read_not_matching_values_as_missings" value="true"/>
<parameter key="datamanagement" value="double_array"/>
<parameter key="data_management" value="auto"/>
</operator>
<operator activated="true" class="set_role" compatibility="7.4.000" expanded="true" height="82" name="Set Role" width="90" x="179" y="34">
<parameter key="attribute_name" value="<Close>"/>
<parameter key="target_role" value="label"/>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="series:fit_trend" compatibility="5.3.000" expanded="true" height="68" name="Fit Trend" width="90" x="313" y="34">
<parameter key="attribute" value="<Close>"/>
<parameter key="keep_original_attribute" value="true"/>
<process expanded="true">
<operator activated="true" class="neural_net" compatibility="7.4.000" expanded="true" height="82" name="Neural Net" width="90" x="179" y="85">
<list key="hidden_layers"/>
<parameter key="training_cycles" value="500"/>
<parameter key="learning_rate" value="0.5"/>
<parameter key="momentum" value="0.4"/>
<parameter key="decay" value="true"/>
<parameter key="shuffle" value="true"/>
<parameter key="normalize" value="true"/>
<parameter key="error_epsilon" value="1.0E-5"/>
<parameter key="use_local_random_seed" value="false"/>
<parameter key="local_random_seed" value="1992"/>
</operator>
<connect from_port="example set" to_op="Neural Net" to_port="training set"/>
<connect from_op="Neural Net" from_port="model" to_port="model"/>
<portSpacing port="source_example set" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
</process>
</operator>
<connect from_op="Read CSV" from_port="output" to_op="Set Role" to_port="example set input"/>
<connect from_op="Set Role" from_port="example set output" to_op="Fit Trend" to_port="example set"/>
<connect from_op="Fit Trend" from_port="example set with trend" 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>
Answers
"Fit Trend" requires a prediction rather than just a label. So you already must have built a model and you feed that into "Fit Trend" and it then fits a trendline to the prediction. See the attached process.
Lindon Ventures
Data Science Consulting from Certified RapidMiner Experts
Hi Brian,
I used your process, but the trend output is the same as the prediction output. Even if I use default model operator as inner learner for the fit trend. Do I something wrong with the date attribute?
In addition why is this operator needing a predicted label attribute? In the tutorial of Thomas Ott (http://www.neuralmarkettrends.com/rapidminer-5-0-video-tutorial-8/) a fit trend operator is directly used on a data set. I tried building this process as well, but get the same error as above above (example set is missing predicted label attribute).
Hope you can help me.
Thanks,
Jeroen