[SOLVED] Currency predicting
Hiran
New Altair Community Member
Hi
I have school project where i ve to predict currency values, And we're told to use NBP (eng: National Bank of Poland) average exchange rates for 2010-2012 and test it with this average exchange rates for 2013 year.
http://www.nbp.pl/?c=/ascx/archa.ascx
Sry for my weak english, im not native english speaker.
I have school project where i ve to predict currency values, And we're told to use NBP (eng: National Bank of Poland) average exchange rates for 2010-2012 and test it with this average exchange rates for 2013 year.
http://www.nbp.pl/?c=/ascx/archa.ascx
<?xml version="1.0" encoding="UTF-8" standalone="no"?>I managed to do this but i dont know why Performance in X-Validation isnt showing me its accuracy. Did i messed something in diagram?
<process version="5.3.008">
<context>
<input/>
<output/>
<macros/>
</context>
<operator activated="true" class="process" compatibility="5.3.008" expanded="true" name="Process">
<process expanded="true">
<operator activated="true" class="retrieve" compatibility="5.3.008" expanded="true" height="60" name="Retrieve 2011" width="90" x="45" y="30">
<parameter key="repository_entry" value="2011"/>
</operator>
<operator activated="true" class="set_role" compatibility="5.3.008" expanded="true" height="76" name="Set Role" width="90" x="179" y="30">
<parameter key="attribute_name" value="data"/>
<parameter key="target_role" value="id"/>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="series:windowing" compatibility="5.3.000" expanded="true" height="76" name="Windowing" width="90" x="313" y="30">
<parameter key="window_size" value="10"/>
</operator>
<operator activated="true" class="set_role" compatibility="5.3.008" expanded="true" height="76" name="Set Role (2)" width="90" x="447" y="30">
<parameter key="attribute_name" value="USD-0"/>
<parameter key="target_role" value="label"/>
<list key="set_additional_roles"/>
</operator>
<operator activated="true" class="x_validation" compatibility="5.3.008" expanded="true" height="112" name="Validation" width="90" x="581" y="30">
<parameter key="sampling_type" value="shuffled sampling"/>
<process expanded="true">
<operator activated="true" class="k_nn" compatibility="5.3.008" expanded="true" height="76" name="k-NN" width="90" x="45" y="30">
<parameter key="k" value="2"/>
</operator>
<connect from_port="training" to_op="k-NN" to_port="training set"/>
<connect from_op="k-NN" from_port="model" to_port="model"/>
<portSpacing port="source_training" spacing="0"/>
<portSpacing port="sink_model" spacing="0"/>
<portSpacing port="sink_through 1" spacing="0"/>
</process>
<process expanded="true">
<operator activated="true" class="apply_model" compatibility="5.3.008" expanded="true" height="76" name="Apply Model" width="90" x="45" y="30">
<list key="application_parameters"/>
<parameter key="create_view" value="true"/>
</operator>
<operator activated="true" class="performance" compatibility="5.3.008" expanded="true" height="76" name="Performance" width="90" x="179" y="30"/>
<connect from_port="model" to_op="Apply Model" to_port="model"/>
<connect from_port="test set" to_op="Apply Model" to_port="unlabelled data"/>
<connect from_op="Apply Model" from_port="labelled data" to_op="Performance" to_port="labelled data"/>
<connect from_op="Performance" from_port="performance" to_port="averagable 1"/>
<portSpacing port="source_model" spacing="0"/>
<portSpacing port="source_test set" spacing="0"/>
<portSpacing port="source_through 1" spacing="0"/>
<portSpacing port="sink_averagable 1" spacing="0"/>
<portSpacing port="sink_averagable 2" spacing="0"/>
</process>
</operator>
<connect from_op="Retrieve 2011" from_port="output" to_op="Set Role" to_port="example set input"/>
<connect from_op="Set Role" from_port="example set output" to_op="Windowing" to_port="example set input"/>
<connect from_op="Windowing" from_port="example set output" to_op="Set Role (2)" to_port="example set input"/>
<connect from_op="Set Role (2)" from_port="example set output" to_op="Validation" to_port="training"/>
<connect from_op="Validation" from_port="model" to_port="result 1"/>
<connect from_op="Validation" from_port="training" 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>
Sry for my weak english, im not native english speaker.
Tagged:
0
Answers
-
I guess it provides the Root Mean Squared Error (RMSE)? That's because you are predicting a numerical value, i.e. you are solving a regression problem. The accuracy can only be calculated for classification problems, i.e. when you predict categories or classes instead of numbers.
Instead of k-NN you should try other regression algorithms such as the Linear Regression. You will find plenty of information on linear regression and the RMSE in that context on the internet.
By the way, instead of using the second Set Role operator, try to enable the create_label parameter in the Windowing operator. Select the USD attribute as label attribute, and for the horizon select which day from the future will taken (x days ahead of the current value).
Best regards,
Marius0 -
Its not RMSE, because i had earlier problems with it.
I changed to linear regression as u suggested but it doesnt solved my problem.
Is it possible to close one of the result screens in a way that would prevent it from appearing again?0 -
Actually, you connected only the upper two output ports of the X-Validation to the process output. Those are the created model and the training data. To see the actual performance, you have to connect the ave-port to the process output. If that does not help, please post a description of your data, i.e. the attributes and their data types.
Best regards,
Marius0 -
Facepalm...
U were right Marius. But now i'm back to RMSE.
http://www76.zippyshare.com/v/718060/file.html
Here u have exported process and 3 excel sheets.
Maybe you will help, because i dont have any idea how to deal with that RMSE.0